Activate or deactivate a field
Activate or deactivate a field
recibeTodo
Posts: 7Questions: 2Answers: 1
Best regard.
I need a field to be disabled when another field has been selected. For example, two date type fields, when the date of one is selected, the date in the other can not be selected. I appreciate the help.
This discussion has been closed.
Answers
I'm assuming you are talking about Editor fields. If so then maybe the dependent() API will help you.
https://editor.datatables.net/reference/api/dependent()
Kevin
Hello Kevin, thank you for responding, I am working with this editor https://editor.datatables.net/examples/inline-editing/submitButton.html what you sent me looks very good but I do not know how to implement it
I found this answer from Allan where he says that it is not possible to use this API with Inline editing with dependent. https://datatables.net/forums/discussion/46020/inline-editing-with-dependent.
I would appreciate any other suggestion
I have a table with inline editing that I allow editing of specific fields based on other field values in the row. In the below example I active inline editing if certain conditions are true (removed the non-relevant code):
HTH,
Kevin
This is correct, since only a single field can be shown as editable at a time while inline editing, you can't control other fields. It would be effectively redundant. You could use
bubble()
to show multiple fields together.Allan
Thanks Kevin and Allan, maybe I can put an alert if I capture one of the two values that interest me, I'm trying to use to capture the values of the fields, but when this line is set,
Inline editing is deactivated. How can I capture one of these two values to send an alert?