Today you will learn how to make choices as clickable buttons. We developed a CSS code that will change the design of your single and multiple choice fields. Use the following CSS code to give your form a modern layout:
body #form div[data-role="choice"] > label > input[type="radio"], body #form div[data-role="choice"] { padding: 0.5em; margin: 0; } body #form div[data-role="choice"] > label > input[type="radio"]{ position: absolute !important; opacity: 0 !important; left: -100% !important; } body #form div[data-role="choice"]:first-child { } body #form div[data-role="choice"],body #form div[data-role=control]:not([data-force-mobile-rendering]) [data-role=input-row] { overflow: unset !important; } body #form div[data-role="choice"] > label > label { display: none !important; } body #form div[data-role="choice"] > label { overflow: unset !important; padding: 0 !important; } body #form div[data-role="choice"] > label > span { width: 150px; height: 40px; display: flex !important; justify-content: center; align-items: center; border: 1px solid #cccccc; } body #form div[data-role="choice"] > label > input:checked + label + span { background-color: #2F86CA; color:#ffffff; } body #form div[data-role="choice"] > label > input:checked + label + span:after { display: block; width: calc(100% + 4px); height: calc(100% + 4px); left: -7px; top: -7px; background-color: transparent; position: absolute; }
For the choices to be displayed one after another make sure to go to each choice field and select the Inline choice option.
Copy paste the code in Edit – Themes – Add custom CSS.
We made bold the parts where you can add your own preferences.
When modifying the code make sure to not delete any semicolons or curly brackets. If something is not working properly you can always copy the code again.
This is a general code that applies on all forms and to all choice fields.
We made this code to have a better understanding of our platform’s flexibility.
Keep in mind that it is not our responsibility to fix the code once you have changed it.
That being said, here is how the CSS will change the design of your form:
Your email address will not be published. Required fields are marked *
Here is a list of the most frequently asked questions. For more FAQs, please browse through the FAQs page.
Thank you