Expand my Community achievements bar.

Layout:ready script is causing weird validation problem

Avatar

Level 5

Hello,

I have a script in the Layout:ready event of the root form (form1) that checks certain sections of my PDF to make sure that all fields have content, and if so, the Submit button turns from gray to green.  Likewise, if the user deletes data from a required field, the button turns from green to gray.   I have used this method in several forms and it works great.  This time, though, I get a big pop-up every time I open the form showing a long list of fields, and saying that all the required fields in the document "cannot be left blank".  I've checked all the Form Properties, compared the script to the other documents, and everything looks good.  When I disable the script the problem goes away, so the problem is either just in the script, or a combination of the script and form settings.  Any help with this would be greatly appreciated.


if ((Page1.execValidate() == true) && (Page2.execValidate() == true) && (Page3.Section1.execValidate() == true))


  {


  Presenter_Submit_Dummy.fillColor = "0,128,0"; //green fill


  Presenter_Submit_Dummy.caption.font.fill.color.value = "255,255,255"; //white font


  }


  else


  {


  Presenter_Submit_Dummy.fillColor = "240,240,240"; //light gray fill


  Presenter_Submit_Dummy.caption.font.fill.color.value = "150,150,150"; //gray font


  }





2 Replies