Editable grid - submitted without rows

I have an editable grid in one of my SAIL forms.  All but one of the columns is set to a required field.  If the user does not click on the 'Add Item' in the grid to add a row, they are able to submit the form.  Is there a way to set up the grid so that the form does not submit when no rows are added to the grid?

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Lead Developer
    in reply to sswilliams
    As mentioned above, to disable any SAIL form button, you utilize the "disabled" parameter of the button widget component, setting it to an expression that would evaluate to "true()" when no entries have been added by the user yet - this somewhat depends on your data and how you&#x27;re storing it, but the generalized example he gave works, except that it should say "length(ri!items) < 1" instead of "< 0", since it would probably be hard for the user to have a negative number ("< 0") of entries.

    Also per the link posted, a feature I forgot about is that you can have validation within an editable grid component itself which only appears after the user attempts to "Submit" the form - if you go this route of course you would not want to disable the submit button at all, these are mutually exclusive solutions.
Children
No Data