Skip Navigation

[Resolved] Toolset forms Checkboxes and Radiobuttons custom style

This support ticket is created 5 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by umbertoZ 5 years, 4 months ago.

Assisted by: Christian Cox.

Author
Posts
#1323815

Hi, I'd like to change the style of Checkboxes and Radiobuttons on some Toolset forms.

I'd like to implement this Bootstrap 4 styling:

hidden link

<div class="btn-group btn-group-toggle" data-toggle="buttons">
  <label class="btn btn-secondary active">
    <input type="radio" name="options" id="option1" autocomplete="off" checked> Active
  </label>
  <label class="btn btn-secondary">
    <input type="radio" name="options" id="option2" autocomplete="off"> Radio
  </label>
  <label class="btn btn-secondary">
    <input type="radio" name="options" id="option3" autocomplete="off"> Radio
  </label>
</div>

Is it possible to change the html output of [cred_field field='type-of-training' force_type='field' class='form-check-input' output='bootstrap'] to get the desired output?

Is there any other way to style it?

thanks

#1323959

Hi, unfortunately there's not an easy way to modify the output template generated by Forms. You have the ability to modify a few specific attributes using the CRED API, but the HTML markup structure isn't one of those attributes. You might be able to use JavaScript to restructure the DOM after the Form loads, but I can't predict the effect this would have on the Form's functionality, including validation and submission of data. That type of customization isn't supported here in the forums.

https://toolset.com/documentation/programmer-reference/cred-api/#cred_filter_field_before_add_to_form

#1324245

My issue is resolved now. I added some custom CSS and jQuery to style Checkboxes and Radiobuttons.

Thank you!