Menu

How to disable required field?

Help
2009-03-06
2013-06-03
  • Helaman Hintze

    Helaman Hintze - 2009-03-06

    I have a field that is required at the moment.
    I would like to turn that feature off now.

    Where do you change the validate code
    to stop it from being required??

    TIA

     
    • Helaman Hintze

      Helaman Hintze - 2009-03-06

      never mind found it finally.....its at the bottom of the page...dud

       
    • TNTEverett

      TNTEverett - 2009-03-06

      At the bottom of your form file you will see lines like this:

      function validatePage1()
      {
      retVal = true;
      if (validateField('field_1','fieldBox_1','menu',1) == false)

      the 1 at the end just before == is telling the validate page function that this field is required.  Make this value 0 and the field is no longer required. 

       
    • Helaman Hintze

      Helaman Hintze - 2009-03-07

      never mind found it finally.....its at the bottom of the page...dud

       
    • John Day

      John Day - 2009-04-24

      I have looked and Have the fields set to 0.  I am still getting required field.  What could be the problem?

      function validatePage1()
                  {
                      retVal = true;
                      if (validateField('field_1','fieldBox_1','menu',0) == false)
      retVal=false;
      if (validateField('field_2','fieldBox_2','text',0) == false)
      retVal=false;
      if (validateDate('field_3','fieldBox_3','date',0,'04/23/2010','04/23/2009') == false)
      retVal=false;

       
  • Soanskdndb

    Soanskdndb - 2009-11-27

    I had the same problem. I set all of my fields to not required, but it was still requiring them, so I just out-right deleted every line associated with the validation stuff:

    function validatePage1()
    {
    retVal = true;
    if (validateField('field_1','fieldBox_1','menu',0) == false)
    retVal=false;
    if (validateField('field_2','fieldBox_2','text',0) == false)
    retVal=false;
    if (validateDate('field_3','fieldBox_3','date',0,'04/23/2010','04/23/2009') == false)
    retVal=false;

    looks like that.

    Once I deleted all of that section, it works fine. No more required fields!

     

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.