Is there a way to control which buttons to display in a Jquery Dialog?
Scenario:
Perhaps there might be program logic whereby after saving the data, the dialog is then able to show a “Delete” button. (meaning after a form submit within the dialog, the entire dialog refreshes? >> this includes the buttons on the dialog being loaded?)
Any advice?
You can do this using the getter and setter methods on the buttons options on the jQuery dialog. The following example is taken from the jQuery UI docs:
So in your example you could do:
Adding
Removing
Here’s a working example.