Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

Can i get ridof this error?

Avatar

Level 3

I keep getting an annoying error message when sowing/hiding fields with required fields.

Below a piece of the form

Do you want to chage your address?  [] yes  [] no

Address ___________________

Zip code ___________________

City ______________________

Country ___________________

Below a piece of the script i use to show/hide the address fields and make them required

if (subform1.question.rawValue != 1){

     subform2.presence = "hidden";

     subform2.address.rawValue = "";

     subform2.address.validate.nullTest = "disabled";

     ........

}

else{

     subform2.precense = "visible";

     subform2.address.validate.nullTest = "error";

     .........

}

But when the address gets visible, i get the message that the address field cannot be empty.

Is it posible to get rid of that error message?

7 Replies

Avatar

Level 5

Hi

subform2.precense = "visible";

this is the line which is causing the problem(Precense spelling mistake it should be "presence") .

Replace "subform2.precense = "visible";" with "subform2.presence = "visible";"

Vjay

Avatar

Level 3

Sorry, my mistake.
I have mistyped it here.
In my original script it is correctly spelled.

Else it wouldn't work at all


Avatar

Level 5

Is der any possiblitiy for u to share File or send it to my mail id : muchukotavijay@gmail.com.so that i can look into it..

Vjay

Avatar

Level 3

just send you an e-mail with the form

Thank you in advance

Avatar

Level 10

There is a typo in your script.

subform2.precense should be subfrom2.presence

Avatar

Level 3

@S.radzmar

Yes i know! Vjay already told me (see above)

It was a typo i made creating this post. Not in the actual form.

Avatar

Level 5

Can you comment the below two lines which are on Calculate event of "Vraag5" subform.

Your are getting that error Since adres,Plaats are null.

          formulier1.Formulier.Vraag5.Vraag5a.Adres.Adres.Adres.validate.nullTest = "error";

                         formulier1.Formulier.Vraag5.Vraag5a.PostcodePlaats.Plaats.Plaats.validate.nullTest = "error";

Thanks

Vjay