Problem with a custom edit button after using the create button
Problem with a custom edit button after using the create button
I have a problem with the following code. If I click on "New" first, then abort that, then I use "Edit" on a row, the bottom button says "Create", not "Cancel" and "Save" like I would see if I reloaded the page, and just used "Edit" first.
Note that I am using a custom edit button for other reasons.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
I think you need to do something like this example here - i.e. create the form buttons when you define the table buttons.
Colin
Thanks for the reply. It didn't make much of a difference. Now there are no buttons on the edit form, unless I try the create first. I tried a couple of variations, but no difference.
live.datatables.net/baposada/1/edit
Hi,
The reason this isn't working is that
formButtons
is something that is understood by theedit
button. You aren't using theformButtons
parameter anywhere in your custom button, so there is no update to the button that was previously configured.The way to do it is to pass the buttons you want to configure into the
edit
call: http://live.datatables.net/ravunoqi/1/edit .Allan
Thank you! I didn't seem to find such an example, but you can't show everything.