Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

"Form1 not defined" error message

Avatar

Former Community Member

Getting Java Script Debugger message: "_form1 is not defined..."

I've used the script:

if

(_form1.AdultProgramSubform.count > 0)

{

form1.AdultProgramSubform.occur.max

+= 1;

_form1.AdultProgramSubform.addInstance(

true);

}

to repeat a subform when a checkbox is clicked. This has worked before to make subforms visible.

Any ideas why I'm getting this message?

4 Replies

Avatar

Level 6

You need following code in place.............I tried and it works.

if (_AdultProgramSubform.count > 0)
{
  form1.AdultProgramSubform.occur.max += 1;
_AdultProgramSubform.addInstance(true);
}

Avatar

Former Community Member

Hi, Varma. Thanks for helping! What object & event did you apply the script to?

Randee

Avatar

Former Community Member

Varma,

Sorry I was so dense. I replace my code with yours, and it working fine. Thanks so much!

Randee

Avatar

Former Community Member

Varma, I've found that the code you sent me is only working if the adult program subform is visible. However, it needs to be hidden in my form. I've read another discussion where someone else had this problem. Do you mind working further with me on this form?

Randee