Menu

Javascript Asistance Required

Help
Simba
2014-07-02
2014-07-02
  • Simba

    Simba - 2014-07-02

    Hi all, hope you might be able to help. I have just used phpFormGen v3.0 to create a multipage form. The problem is I am not very good with Javascript. I want to add a Javascript function that does not allow the form to proceed if "No" is selected in a dropdown menu. The code is as follows.

    References

  • <label class="">Do You Have More Than 5 Years Traceable References? * Can you provide referees who have known you for more than 5 years? This is essential for compliance. If you do not have this you may not proceed beyond this point.</label><select class="" name="field_15" id="user-content-field_15"><option value=""></option><option value="No">No</option><option value="Yes">Yes</option></select>
  • <script type="text/javascript"> <!-- function validatePage3() { retVal = true; if (validateField('field_15','fieldBox_15','menu',1) == false) retVal=false; if(retVal == false) { alert('Please correct the errors. Fields marked with an asterisk (*) are required'); return false; } return retVal; } //--> </script>
 

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.