Prevent Customised control buttons in editor to edit all fields in the selectd row
Prevent Customised control buttons in editor to edit all fields in the selectd row
Hello,
I have "Customised control buttons" in the system when the admin click on it to the "Status" field become 'Confirmed' , but the are some fields edit as well and I don't want to. So, how can I prevent these fields th edit when the admin click the customised button.
Regards
Replies
I'm not too clear on the problem, but
preOpen
may help as it's cancellable. This example demonstrates how it works, preventing editing the Office field if it contains "London".If that doesn't help, please can you elaborate on the flow - i.e. are the control buttons per record or would it affect all the records?
Colin
Hello Colin,
Here the editor code:
The Category and Activity are dependent fields. The Status field has default value "Pending", The Admin review the the user's details if correct then will click on "Confirm" button and must the value of "Status" change to "Confirmed" and this works, the value of "Activity" change as well.
Here the button code
Hello Colin,
I found the problem and need your help to fix it.
The problem is because of the "Placeholder".
If I set "Placeholder" the button unable to change "Status" value and if remove "Placeholder" the button work, but the "Activity" value change with "Status" field.
Regrds
That sounds odd. Could you link to your page so we can take a look, please,
Colin
Hello Colin,
The system in the localhost.
Just if remove placeholder from select the button work, but activity field change as well
with placeholder the button not work
Hello Colin,
Please check your inbox message because I have send you link for my system
Regards
Thanks, I tried it, but it appeared to work for me - I was able to confirm and reject those two records.
I've mocked up a similar setup here, with the a button to set the office to Tokyo - likewise, with
placeholder
set, it also appears to work. Could you look at that please, and see if you can get that example to behave like you're seeing with your app, as it would help to debug.Colin
Hi colin,
Could you please give the link of that example.
Regards
Oops, apologies, here it is : http://live.datatables.net/fesocobo/1/edit
Colin
Thanks Colin for your help. I solved the problem by putting dependent inside if statement.
Regards
Excellent, glad all sorted,
Colin
Thanks Colin