fat creative Posted December 7, 2008 Share Posted December 7, 2008 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! Quote Link to comment https://forums.phpfreaks.com/topic/135954-selecting-all-checkboxes-on-dynamically-created-form/ Share on other sites More sharing options...
premiso Posted December 7, 2008 Share Posted December 7, 2008 I think this is more a javascript problem. You cannot do this with PHP since it is a PRE-process not a POST-process like JS is. Quote Link to comment https://forums.phpfreaks.com/topic/135954-selecting-all-checkboxes-on-dynamically-created-form/#findComment-708708 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.