How to add quantity field next to a checkbox

By: Adan Jimenez | Asked: 11/09/2023
ForumsCategory: How-toHow to add quantity field next to a checkbox
Adan Jimenez asked 5 months ago
Hey, I'm creating a form that will allow user to request a quote on their product selection. I need to add a quantity field that will only appear when the user click on each checkbox but in 3 columns: Product A | Product B | Product C   Product A
  • checkbox 1  - add quantity box only if checked
  • checkbox 2 - add quantity box only if checked
  • checkbox 3 - add quantity box only if checked
the only way I'm able to do it right now is by creating each checkbox individually but then I can't manage my columns. I'm put 1/6 for each element as follow: Product A (1/6) Checkbox Product A (1/6) Product B (1/6) Checkbox Product B (1/6) Product C (1/6) Checkbox Product C (1/6)  does anyone have a simple solution?        
2 Answers
Rob LeVineRob LeVine answered 5 months ago
Did you try using frm_inline as the CSS class for all the elements?
Adan Jimenez answered 5 months ago
I've added a screenshot of what I'm trying to do. frm_inline doesn't seems to work. I need the quantity box to be aligned with the current checkbox selected.  Acutally I've created 1 column for the checkbox, 1 for the quantity but that doesn't work as I want. Any suggestions?
Attachments
Rob LeVineRob LeVine replied 5 months ago

I can say with 100% certainty that there's no way to do that without a lot of CSS customizations. You could figure out how to do it with raw HTML, CSS, and jQuery (for the conditional logic), put it in an HTML field and then use the after frm_after_entry_create to move the values into hidden form fields. That seems like a lot of work though.

Adan Jimenez replied 5 months ago

ok that's what I thought! was asking just in case they were an option somewhere that I was missing.

Thanks for your feedback

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