Is there a way to specify , that these fields are non mandatory in the editor form?
Is there a way to specify , that these fields are non mandatory in the editor form?
naveensargam
Posts: 3Questions: 2Answers: 0
Right now i want my editor form to accept null values meaning i want to specify that these fields are not required.
but it is giving me error if cant put any values.
Answers
What error is it giving you? Post a test case please. The minimum would be to post the error message you get.
And yes of course you can leave Editor fields empty. Editor doesn't care if fields are filled or not. You would need to use a validator if you want to display an error message.
If you don't use a validator you need to make sure your database fields can handle empty values. Depending on your database field format you might need a setFormatter that transforms an empty field into null values. That may be relevant for date fields for example.
You can attach a message to the form input.
https://editor.datatables.net/reference/option/fields.message
... and a placeholder of course. But that won't resolve the error situation, I guess. You can also use client side validation. Just take a look at the list of Editor event handlers.