Expand my Community achievements bar.

SOLVED

Problem with validation

Avatar

Level 7

I have a form with  4 Drop boxes all of them are required:

Divisions

DEPARTMENT CENTRE

DEPARTMENT FOUDATION

DEPARTMENT RESEARCH

From the divisions DD user have to select one value.

If Division value is Centre then:

DEPARTMENT CENTRE -visible

DEPARTMENT FOUDATION - invisible

DEPARTMENT RESEARCH - invisible

If Division value is Foudation then:

DEPARTMENT CENTRE -invisible

DEPARTMENT FOUDATION - visible

DEPARTMENT RESEARCH - invisible

If Division value is Research then:

DEPARTMENT CENTRE -invisible

DEPARTMENT FOUDATION - invisible

DEPARTMENT RESEARCH - visible

My problem is when I select a value from division and then a value from from Department DD  the EMAIL button(Function) does not work

because I get the message that the other two fields(are empty)!

Where I can send my form so someone can check?

Thanks

1 Accepted Solution

Avatar

Correct answer by
Level 10

Here is the updated form..

Two things I corrected..

1) You are not sending the return value from the global function "Ex1ValidFields" when the mandatory field is missed.

2) In the email button though you are checking for true from the function you did not wrap the entire code after the "If" condition in flower brackets. "{}"..

    If you do not put the brakets around the code after If condition, only the first row will be impacted with the If condition. That means incase your If condition fails, the first row will not execute but the rest of the code will continue to execute..I placed the brackets around the entire code in Email button code.

  You do not need Reg expressions to check the empty ness in this situation. Just by using the rawValue can help.

https://acrobat.com/#d=ACLWW*m6lJzXgl2jz1GEnAhttps://acrobat.com/#d=4lZAUYsCfe1vJOjDnzZ0uQ

Thanks

Srini

View solution in original post

5 Replies

Avatar

Level 7

You might find this blog entry helpful:

http://blogs.adobe.com/formfeed/2008/10/exclusion_groups_v30.html

It details how to create a subform and set a minimum and maximum number os required fields within the subform. Essentially you can have several objects, e.g. - drop down list, checkbox and text field and require the user to fill out one of the three - exactly as you're trying to do with your drop down lists.

Avatar

Correct answer by
Level 10

Here is the updated form..

Two things I corrected..

1) You are not sending the return value from the global function "Ex1ValidFields" when the mandatory field is missed.

2) In the email button though you are checking for true from the function you did not wrap the entire code after the "If" condition in flower brackets. "{}"..

    If you do not put the brakets around the code after If condition, only the first row will be impacted with the If condition. That means incase your If condition fails, the first row will not execute but the rest of the code will continue to execute..I placed the brackets around the entire code in Email button code.

  You do not need Reg expressions to check the empty ness in this situation. Just by using the rawValue can help.

https://acrobat.com/#d=ACLWW*m6lJzXgl2jz1GEnAhttps://acrobat.com/#d=4lZAUYsCfe1vJOjDnzZ0uQ

Thanks

Srini