DataTable entry

Can it be made mandatory for a new record to be added to a DataTable? I’d like for a new record to be required before a user can submit a form.

Hi!

Yes, you can add a validator to a DataTable control, “addValidator(validator)” method: https://plumsail.com/docs/forms/javascript/controls.html#datatable

Thanks for your response. I’ve added the addValidator code from your example but it still allows the form to be submitted without adding a new record.

Hi!

Have you added your validator code into “spRendered” or “rendered” event handler? https://plumsail.com/docs/forms/javascript/manager.html?highlight=sprendered

If an issue still exists, could you please provide all your code?

Thanks Alex,
Your correct, it was an issue with my code. Its working correctly now.
Appreciate your help!

You’re always welcome!