Create Ticket My Tickets Post Discussion
Welcome
Login  Sign up

Making fields in a repeating table required

The following workaround can be used to enforce that a field within a repeating table be required for the user to complete, even if the table is not required.

  1. Add a hidden field inside the table field {{tally}} with the following Dynamic Value, with {{field}} being the data name of the field inside the table:

    IF({{field}}!='',1,0)

    This will enumerate a value of 1 if there is a value present but keep it at 0 if nothing has been entered.

  2. Add another hidden field outside the table {{count}} with the following in the dynamic value:

    SUM({{tally}})

    This will sum up the value of the {{tally}} fields inside the table.

  3. Add a text field or another field beneath the hidden field above with something like this in the Default Value property, ensuring that the Required and Read Only checkboxes are ticked:

    Please enter (such and such) above

    You might also include a Visibility rule to show the field only if {{field}} has not been filled out:

    {{field}}!=''

    Then add following in the Custom Validation property:

    {{count}}>0

    Also add something like this in the Validation Message property:

    Please enter (such and such) above

    This will force the user to stop and add a value to the table field if no rows have been added -- i.e., if the value of {{count}} is less than 1.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.