select/deselect all checkboxes

User 624566 Photo


Registered User
5 posts

Is there a way to have a checkbox that will select and deselect all checkboxes in a group?

And a second question:

The form I am creating will have many separate checkbox groups. Is the a way to check before submission that at least a certain # of checkboxes are selected in total? I don't want to use the standard function for each individual group, it just wont work for my needs.
User 2147626 Photo


Ambassador
2,958 posts

Is there a way to have a checkbox that will select and deselect all checkboxes in a group?

Don't think so. I'm sure one of the coders here can probably come up with a solution. That would be a great submission for a future release though. Hang on, maybe one of the coders will jump in.
Is the a way to check before submission that at least a certain # of checkboxes are selected in total?

Yes. In the options of the checkboxes, down under options, there is a line to 'require' x number of boxes to be checked.

If you mean to check for a total of several groups of checkboxes, then again I think you'll have to code in something yourself.
Graphics for the web, email, blogs and more!
-------------------------------------
https://sadduck.com
User 624566 Photo


Registered User
5 posts

Thanks Gunsmoke,

But in reference to the second question. I want a way to determine if a certain amount of checkboxes were selected from ALL groups total.

Example:

I have 5 different checkbox groups. Each with 5 checkboxes.
Before the user can submit the form, I need a way to make sure 5 checkboxes were selected in total.
They can all be in one group, 1 in each of the 5 groups, 2 in one and 3 in another, etc...

Thanks
User 2147626 Photo


Ambassador
2,958 posts

You'd have to code in something for that and I'm not really a coder. Hopefully Eric or someone will chime in here shortly. Sorry I couldn't be more help. :cool:
Graphics for the web, email, blogs and more!
-------------------------------------
https://sadduck.com
User 624566 Photo


Registered User
5 posts

All good Gunsmoke. Thanks.

I created a test form with 2 groups and a min require on each so I could see how it is validating. I opened the validation_data.js file and see this:

var data_validation = '{"fb-submit-button":{"hover":{"background-image":""}},"item1_0_checkbox":{"minlength_checkbox":3,"required":true},"item2_0_checkbox":{"minlength_checkbox":2,"required":true}}';
var data_jsplugins = '[]';
var data_cssplugins = '[]';


I have tried many way to stack item1_0_checkbox and item2_0_checkbox to make it validate across the groups, but it is just not working. I turned it into somenething like:

var data_validation = '{"fb-submit-button":{"hover":{"background-image":""}},"item1_0_checkbox,item2_0_checkbox,":{"minlength_checkbox":3,"required":true}}';
var data_jsplugins = '[]';
var data_cssplugins = '[]';


I tried many other variations, I am just not sure what would work.
User 187934 Photo


Senior Advisor
20,271 posts

This thread might help.
http://www.coffeecup.com/forums/web-for … m-results/
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.