Field validation - make sure at least one field is populated
Thursday, July 6, 2023 at 12:54pmI have 5 text fields on my form. Is there a way to make sure the signer (recipient) enters value in at least one of the five textboxes before the signer signs and completes the form?
Reply to: Field validation - make sure at least one field is populated
Thursday, July 6, 2023 at 01:15pmHi gberde,
Thanks for your post! You can add conditional logic to your fields to achieve the goal. Below is a JSON example where if any of the text fields "6GZpLhdVsxk0", "OBTUlemw7VY8", "DjMy29Jb5eg2", "BcRM86gDgpoB", "TpdJR1F0NIs7" is not empty, signature "ScgWPYhzQxIV" will be enabled. Otherwise the signature is disabled.
"conditions": [
{
"id": "6562339e-e0aa-47ec-a96f-82cdbbc8fe18",
"condition": "document['627758e1affd5443f1bacf3b2907687277b1bdde1a8cc903'].field['6GZpLhdVsxk0'].empty == false",
"action": "document['627758e1affd5443f1bacf3b2907687277b1bdde1a8cc903'].field['ScgWPYhzQxIV'].disabled = false;"
},
{
"id": "c9463cf4-54b9-4fad-947c-0fc8ced4a9bf",
"condition": "document['627758e1affd5443f1bacf3b2907687277b1bdde1a8cc903'].field['OBTUlemw7VY8'].empty == false",
"action": "document['627758e1affd5443f1bacf3b2907687277b1bdde1a8cc903'].field['ScgWPYhzQxIV'].disabled = false;"
},
{
"id": "5b1f7d53-548c-416d-8b75-0bb681c85f41",
"condition": "document['627758e1affd5443f1bacf3b2907687277b1bdde1a8cc903'].field['DjMy29Jb5eg2'].empty == false",
"action": "document['627758e1affd5443f1bacf3b2907687277b1bdde1a8cc903'].field['ScgWPYhzQxIV'].disabled = false;"
},
{
"id": "b8cd4b6e-6690-4acb-8672-0bb27be4c7db",
"condition": "document['627758e1affd5443f1bacf3b2907687277b1bdde1a8cc903'].field['BcRM86gDgpoB'].empty == false",
"action": "document['627758e1affd5443f1bacf3b2907687277b1bdde1a8cc903'].field['ScgWPYhzQxIV'].disabled = false;"
},
{
"id": "7727ff52-1fcb-49fe-8c4c-88b924f1aeb2",
"condition": "document['627758e1affd5443f1bacf3b2907687277b1bdde1a8cc903'].field['TpdJR1F0NIs7'].empty == false",
"action": "document['627758e1affd5443f1bacf3b2907687277b1bdde1a8cc903'].field['ScgWPYhzQxIV'].disabled = false;"
}
]
Let me know if this works for you.
Duo
Reply to: Field validation - make sure at least one field is populated
Friday, July 7, 2023 at 07:52amwhen we do this, does signature "ScgWPYhzQxIV" remain disabled by default when the form is opened?
Reply to: Field validation - make sure at least one field is populated
Friday, July 7, 2023 at 08:28amHi gberde,
Yes, a condition automatically implies its opposite scenario that when none of these text fields are filled in, the signature will be disabled.
Duo