Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

submit a form with a hidden mandatory fields without any value

Avatar

Avatar
Validate 25
Level 2
mmgiath
Level 2

Likes

6 likes

Total Posts

321 posts

Correct Reply

0 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 5
Boost 3
View profile

Avatar
Validate 25
Level 2
mmgiath
Level 2

Likes

6 likes

Total Posts

321 posts

Correct Reply

0 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 5
Boost 3
View profile
mmgiath
Level 2

30-05-2013

How I can submit a form with a hidden mandatory fields without any value?

when I try to submit the form still ask me for mandatory fields to fill.

Hidden mandatory fields become visible if a condition is met.

Any sample to avoid this problem?

Thank you

Accepted Solutions (0)

Answers (3)

Answers (3)

Avatar

Avatar
Validate 25
Level 2
mmgiath
Level 2

Likes

6 likes

Total Posts

321 posts

Correct Reply

0 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 5
Boost 3
View profile

Avatar
Validate 25
Level 2
mmgiath
Level 2

Likes

6 likes

Total Posts

321 posts

Correct Reply

0 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 5
Boost 3
View profile
mmgiath
Level 2

30-05-2013

Thanks very much for your help.

A question:

what this mean: "no"

I suppose the correct is:

textField2.rawValue == "no

not

textField1.rawValue == "no

Avatar

Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile

Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
Level 4

30-05-2013

I would set the condition to flag the fields as mandatory if they are met. otherwise, it shouldn't be mandatory since it is hidden.

For example:

if (textField1.rawValue == "no"){

   this.parent.textField2.presence="hidden";

   this.parent.textField2.mandatory="disable";

}

else {

   this.parent.textField2.presence="visible";

   this.parent.textField2.mandatory="error";

   this.parent.textField2.mandatoryMessage="This is required.";

}

Message was edited by: jasotastic81--corrected the code

Avatar

Avatar
Boost 5
Level 3
Adobe_ejs
Level 3

Likes

11 likes

Total Posts

77 posts

Correct Reply

3 solutions
Top badges earned
Boost 5
Boost 3
Boost 10
Boost 1
Affirm 3
View profile

Avatar
Boost 5
Level 3
Adobe_ejs
Level 3

Likes

11 likes

Total Posts

77 posts

Correct Reply

3 solutions
Top badges earned
Boost 5
Boost 3
Boost 10
Boost 1
Affirm 3
View profile
Adobe_ejs
Level 3

30-05-2013

Try setting the presence to Inactive.  See:http://blogs.adobe.com/formfeed/2009/03/xfa_30_presenceinactive.html.

I see that this is not properly documented in the help.  I'll log a bug.