Add 'Cancel' button to in table form controls
Add 'Cancel' button to in table form controls
Restful Web Services
Posts: 202Questions: 49Answers: 2
in Editor
Sorry if this is an obvious question but I cannot figure out how to add a 'cancel' button when using in table form controls? This is used to remove a row from the table and I would like to add a cancel button,
// Delete a record
$('#cms_module_system_tasks').on('click', 'a.editor_remove', function(e) {
e.preventDefault();
editor.message('Are you sure you wish to remove this record?').buttons('Delete').remove($(this).closest('tr'));
});
Can anyone point me in the direction of a working example?
Thanks
This discussion has been closed.
Answers
Hi,
Possibly the best way is to use the
form-options
parameter which you can pass intoremove()
. For example your above call might become:The
form-options
is good for this sort of thing as it removes any asynchronous issues that can crop up should you happen to be using inline editing or bubble editing.Regards,
Allan
Hi Allan,
Thanks for your help. For anyone who might also be interested here is the final code I used.
Cheers
Chris