In this example, we're going to unhide a mandatory DOCUMENT FIELD if the member is 21 years old or older. BUT only if the application has more than 2 members over 21.
GO TO: CONSTANTS TAB
Step 1
Create a constant that determine the age proof or residency is required.
- Constant Name: AGE_ADULT
- Value (enter the fee): 21
- Description: Enter the age of an adult. Used to determine when proof or residency is required.
GO TO: CALCULATIONS TAB
Step 2
Add a calculation that counts the number of adults.
- Result Name: AdultCount
- Expression: countIfCmp("patronAge", #AGE_ADULT, ">=")
GO TO: FORM TAB
Step 3
Use a hidden INLINECALCULATION FIELD field to calculate each member's age.
Add or confirm the following field is within the patronsgroup. Place it directly under the field patronBirthDate.
- Field Name: patronAge
- Field Label: Age:
- Initially Hidden: Checked
- Calculation Result Name: age(sibling("patronBirthDate"))
- Decimal Places: 0
Step 4
After the patronAge field, add the field....
- Field Name: UploadPOR
- Instructions: Members 21 years old and older must upload proof of residency. (Tip: Upload a copy of a phone bill.)
- Field Label: Proof of Residency
- Required for Patron: Checked
- Modifiable after Submit: Checked
- Initially Hidden: Checked
- Hide/Unhide Calculation, use: age(sibling("patronBirthDate")) >= #AGE_ADULT && {AdultCount}>2
Edit the age (21) and instructions as needed.
Step 5
Preview & Test your application using the preview tab.