Exact matches only
Search in title
Search in content
Search in posts
Search in pages

Make choices as clickable buttons

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.

Make choices as clickable buttons

Copy paste the code in Edit – Themes – Add custom CSS.

Make choices as clickable buttons

We made bold the parts where you can add your own preferences.

  • width:150px – increase the number of pixels to make the button wider.
  • height:40px – change the row height to any size.
  • background-color: #2F86CA – add the hex code of your desired color ( currently it is a shade of blue when someone clicks on a choice).
  • color:#ffffff – this will change the font’s color when the choice is selected. (currently white).

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:

Make choices as clickable buttons

Leave a Reply

Your email address will not be published. Required fields are marked *

Frequently Asked Questions

Here is a list of the most frequently asked questions. For more FAQs, please browse through the  FAQs page.

Is this service free?
Yes, we offer a free form builder service. Just sign up to the Basic plan and you are all set. This plan is forever free, but you are limited with a few features only, such as 5 forms per account, 100 submissions per month and you have to keep the backlink to 123FormBuilder on your forms. Check out our features matrix for more information.
How many forms can I create?
It depends on the service plan you are on. Higher service plans enable more features, including more web forms for your account. If you need more forms, go to the My Account section of your account and click the upgrade button. To create an unlimited number of forms, either upgrade to the Platinum service plan or higher. Consult our features matrix for more information.
How can I publish my forms?
You can publish your forms in many ways, by using their direct URL or HTML link, embedding them with a JavaScript code, Inline HTML or iFrame, using the Facebook app or the WordPress plugin, using popups, the Blogger code snippet and many more. Once you have created and customized your form, go to the Publish section to complete your work. Read more in our documentation.
How do I change my form design?
You can change the design of your form in the Themes section, which is located in your form settings. We offer a set of more than 30 predefined form themes for your forms, but you can also create your own from scratch. You can customize the submit button, the logo and more. To apply your own stylesheets, all forms come with a custom CSS editor.

Can't find what you're looking for?