Hi, I'm working with an editable table that needs all fields to be mandatory. I've checked the Mandatory tick in validation constraints but the form allows the users to submit it without entering any values in any of the table fields. All other mandatory fields behave as expected, only the ones in the editable table do not. Any help fixing this issue would be appreciated.
RE: Mandatory fields on editable table
The first thing I would check is that validation is turned on for the editable table. To do this, click on the table_init custom field immediately after the table, and make sure that the 'validate' parameter is set to true.
This setting should make sure that the fields are validated when trying to insert or edit rows of the table.
This wont change the behaviour of the form submit process however, as the validation settings on the editable table fields only apply when editing/inserting a row. Making a field required will make sure that each row has that field present, but doesn't enforce that there must be any rows.
If you do need to make sure the users have added at least one row (for example) then you can add some additional checks before calling the submit action.
As an example, you could use a Custom Check condition with the following content to detect when the table has no rows.
hyf.editabletable.manageCount(document.getElementById('EditableTable'), 'get') == 0
I hope this helps.
Please let me know if you have any further questions.
Regards,
Gerard
RE: Mandatory fields on editable table