Home › Forums › Quform WordPress › Limit Checkbox Selections Across Multiple Checkbox Fields
- This topic has 3 replies, 2 voices, and was last updated 3 weeks, 3 days ago by Ally.
- April 28, 2023 at 6:46 am #35451colourcraftParticipant
I want to style a number of checkboxes so that a maximum of 8 checkboxes can be selected, but need the checkboxes to have sub-headers separating some of them for styling purposes. It is for a swatch selection form, so as an example we would have is below… (The small ‘x’ representing the checkbox symbol)
~~~ Blue Colours~~~
x Kingfisher Blue
x Baby Blue
x China Blue
x Vintage Blue
x Forest Green
x Racing Green
x Vintage Green
I can’t see an easy way of having dividers in between certain checkbox break points when using just one single field, so I presume, unless it is possible, that the only way would be to have separate checkbox fields for each of the colour groups, with the sub-headers as html fields to separate them.
I can see that you have some example code to limit the number of checkbox selections for a specific field ID, but is there a way, for example, to restrict the maximum number of checkbox selections to, say, 8 selections spread across 5 different checkbox ID’s
If the example code could be supplied to do this, or if there is a way to introduce html code to break up checkboxes with sub header styling within a single checkbox ID, that would be fantastic.May 1, 2023 at 11:54 am #35459AllySupport Staff
You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.May 2, 2023 at 2:43 pm #35462colourcraftParticipant
I’ve tried this, but think it would be easier styling wise to just do the calculation check across multiple check box fields, just for ease of editing in future from our end. So if its possible, it would be great to see the code to count selected items across multiple checkbox field s to only allow a maximum of 8 entries (as an example)…May 3, 2023 at 10:17 am #35465AllySupport Staff
You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
- You must be logged in to reply to this topic.