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

SOLVED

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

samig56693510
Level 1
Level 1

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.

1 Accepted Solution
samig56693510
Correct answer by
Level 1
Level 1

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".

View solution in original post

3 Replies
sergiy2511
Level 2
Level 2

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.

samig56693510
Level 1
Level 1

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.

samig56693510
Correct answer by
Level 1
Level 1

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".

View solution in original post