I have been trying to get this code to work for days now and I finally have to throw my hands up and ask for help. What seems like something easy is getting more difficult as I go line by line. Here is the concept, upon clicking to send a contact form - depending on which subject the client chooses, it will correctly show which fields need to be entered based for that specific selection, and upon php submit it will run validation and send by email ALL fields. (will tackle those issues next)The options for the subject bar, numbers 1&2 will never show/hide any specific fields (general entry), but be shown in Selection 3/4/5. selection #3 will show for example fields "a,b,c"; selection #4 will show "A,D,E" and #5 may show "D,F,G". I will post the excerpt of code I have been working with, omitting additional form fields which wont add to help the debug. What I have been running into is when i code the single hide/show for selection # 3, it works perfectly. But when I go to code the combination of selection 3&4, selection#4 show/hide works, but #3 breaks. Furthermore, the code that I am using does not work on radio buttons or checkboxes, which is a necessity for this specific application, so if anyone could assist adding that functionality as well, it would be much appreciative. [it is commented out at this time, feel free to modify] I appreciate any and all assistance with this and will, after it is finished, post the website for where you can find the form. (You can reference to it for a portfolio)P.S. This form is going to need to submit without refresh happening, and I may also add that since I will be using other javascript to perform validation, I am slightly concerned that there may be some conflict between my current script and the jquery.validationEngine.js and jquery.jqtransform.js I will be using moving forward. Thanks for any anticipated assistance!
Change Form Fields On Subject Change. Multiple Fields hidden/shown
in JavaScript
Posted
I have been trying to get this code to work for days now and I finally have to throw my hands up and ask for help. What seems like something easy is getting more difficult as I go line by line. Here is the concept, upon clicking to send a contact form - depending on which subject the client chooses, it will correctly show which fields need to be entered based for that specific selection, and upon php submit it will run validation and send by email ALL fields. (will tackle those issues next)The options for the subject bar, numbers 1&2 will never show/hide any specific fields (general entry), but be shown in Selection 3/4/5. selection #3 will show for example fields "a,b,c"; selection #4 will show "A,D,E" and #5 may show "D,F,G". I will post the excerpt of code I have been working with, omitting additional form fields which wont add to help the debug. What I have been running into is when i code the single hide/show for selection # 3, it works perfectly. But when I go to code the combination of selection 3&4, selection#4 show/hide works, but #3 breaks. Furthermore, the code that I am using does not work on radio buttons or checkboxes, which is a necessity for this specific application, so if anyone could assist adding that functionality as well, it would be much appreciative. [it is commented out at this time, feel free to modify] I appreciate any and all assistance with this and will, after it is finished, post the website for where you can find the form. (You can reference to it for a portfolio)P.S. This form is going to need to submit without refresh happening, and I may also add that since I will be using other javascript to perform validation, I am slightly concerned that there may be some conflict between my current script and the jquery.validationEngine.js and jquery.jqtransform.js I will be using moving forward. Thanks for any anticipated assistance!