- April 28, 2023 at 6:46 am #35451
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 #35459May 2, 2023 at 2:43 pm #35462
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 #35465June 16, 2023 at 11:02 am #35607
Thank you for this code, it works well.
June 16, 2023 at 12:32 pm #35612
- This reply was modified 8 months, 3 weeks ago by colourcraft.
- You must be logged in to reply to this topic.