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

Trouble with mandatory fields in subforms with .presence = "inactive";

Avatar

Avatar
Validate 1
Level 1
samig56693510
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
samig56693510
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Affirm 1
View profile
samig56693510
Level 1

29-03-2019

Hello all.

For the past few weeks I have been building a form. In this form are fields which are mandatory, but that are in inside optional subforms - that is, if that subform is not in use, the fields within are not required.

I have set the parent subform's presence to "inactive", but the fields within that subform still cause mandatory field errors when submitting the form as a PDF by email. The target version is set acrobat reader 9.1 or later.

Any help would be massively appreciated.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
Level 1
samig56693510
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
samig56693510
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Affirm 1
View profile
samig56693510
Level 1

01-04-2019

For anyone who has the same issue, I did finally get the form working.

I basically copied all the subforms into a completely new form. This fixed the inactive presence issue, but broke validation after the first radio field.

To fix the radio field issue I had to change the Adobe reader target version: "File -> form properties -> defaults" and set the target version to "Acrobat and Adobe Reader 9.1 or later".

Answers (2)

Answers (2)

Avatar

Avatar
Validate 1
Level 1
samig56693510
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
samig56693510
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Affirm 1
View profile
samig56693510
Level 1

01-04-2019

While that would work, it would take a very long time, and the logic would not be simple - some subforms have a mixture of required and non-required fields that also change depending on other selections within that form. Hiding and reshowing subform would break it. The .presence = "inactive" is exactly what is needed here, but for some reason, does not work.

Avatar

Avatar
Applaud 5
Level 2
sergiy2511
Level 2

Likes

0 likes

Total Posts

21 posts

Correct Reply

6 solutions
Top badges earned
Applaud 5
Affirm 5
Affirm 3
Affirm 1
View profile

Avatar
Applaud 5
Level 2
sergiy2511
Level 2

Likes

0 likes

Total Posts

21 posts

Correct Reply

6 solutions
Top badges earned
Applaud 5
Affirm 5
Affirm 3
Affirm 1
View profile
sergiy2511
Level 2

29-03-2019

Hi, it looks like you need to modify the scripts controlling the optional subforms appearance. When your logic shows the subform, make your fields in this subform required by adding something like

Field.mandatory = "error"; - to make mandatory

when your condition is hiding the subform, add

Field.mandatory = "disabled"; - to make optional

I hope it helps.