Style Dynamic Checkboxes and Radios As Buttons

By: Michael Clark | Asked: 05/18/2022
ForumsCategory: How-toStyle Dynamic Checkboxes and Radios As Buttons
Michael ClarkMichael Clark asked 2 years ago
I’m looking for pointers or starter code to help get me on my way. Happy to trade time on WP and/or Formidable projects if anyone is interested. Here’s my simple need: I need to style lookup and dynamic checkboxes and radios as buttons. I already have the custom styling for them once they’re buttonified. Like how you can do in the form editor for standard checkboxes and radios. Any takers? Anyone have specific pointers on how to target these particular elements? Grateful for the assistance.
2 Answers
Victor Font answered 2 years ago
If you are trying to achieve what's being done in this example, it's purely handled with CSS: https://stackoverflow.com/questions/52707749/how-can-i-display-select-options-as-buttons
Michael ClarkMichael Clark replied 2 years ago

Noted. Thanks, Victor. What I'm struggling with is that Dyanmic checkboxes and radios are referenced differently than the standard ones. So I'm wondering if anyone has been successful in targeting those specific elements in their custom CSS. Now, that I'm *completely spoiled* by your field key utility, I'm thirsting for a similar utility that lists all of the standard and dynamic field types with their associated CSS classes and a simple note field on how to target:

Dynamic > Checkbox - .frm_dynamic_whoozawhatsit. ...

🙂

Bobby Clapp answered 2 years ago
It's not recent, but this will get you close. https://www.techmavenconsulting.com/2015/05/26/formidablepro-fancy-radiocheckbox-buttons/ Quickly, if I add: .with_frm_style .frm_radio input[type="radio"], .with_frm_style .frm_checkbox input[type="checkbox"], .with_frm_style .frm_checkbox input[type="checkbox"] { display: none !important; } This appears to fix the issue. It's likely some of my existing code needs reworked and the above would not be needed.
Michael ClarkMichael Clark replied 2 years ago

Nice. thanks, Bobby. I'm wondering if this works on *dynamic* checkboxes? Have you tried it out on those? It's be *really* great if, in the editor, when you select a dynamic field and set it's field type to either checkbox or radio that another panel appeared there with the exact same options as standard checkboxes and radios.

I'm going to fire up my formidable forms lab and poke around some more. Before I get in trouble in a production site. 😛

Bobby Clapp replied 2 years ago

I don't know that. I believe it would.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right