Jump to content

Selecting all checkboxes on dynamically created form


fat creative

Recommended Posts

I have a form that is dynamically created based on selections from a previous page. In the form, there are several checkboxes and each checkbox has a unique name.  When this form is submitted, it checks whether each unique checkbox is either true or false and then sends mail based on that selection.

 

What I need to add to this is the ability to select ALL checkboxes before submitting the form. I can do this in javascript, but that seems to need all the checkboxes to have the same name / different id.  They all need to have a different name so I can evaluate them on the next page to send mail.  I was hoping that if I put in all possible checkbox names, the javascript would just skip what doesnt exist, but instead it created an error message. I turned off the error messages, but it just stops the script, it won't just skip the line with the error in it.

 

Does anyone know of a way to do this in PHP?  Or anyway???? :-)  I can't seem to get past this and I think it's the last thing I need for my project.  I don't know javascript at all, and am quickly learning PHP, so any advice would be appreciated.  Thanks in advance!

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.