Is there any way to add a custom button in edit form.
thanks in advance
⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠
Posted 18 July 2013 - 07:48 AM
Is there any way to add a custom button in edit form.
thanks in advance
Posted 19 July 2013 - 07:11 AM
Hello and welcome to the forums [member=shuvo_mahfuz].
If you mean the same way we do by using the add_action unfortunately no there is not.
But you can make tthis button statically by modifing the assets/grocery_crud/themes/your_theme/views edit.php file.
Otherwise you can inspect the getState and on $state == 'edit' inject some js/jq code.
Posted 06 January 2014 - 12:51 PM
Hello and welcome to the forums [member=shuvo_mahfuz].
If you mean the same way we do by using the add_action unfortunately no there is not.
But you can make tthis button statically by modifing the assets/grocery_crud/themes/your_theme/views edit.php file.
Otherwise you can inspect the getState and on $state == 'edit' inject some js/jq code.
In $state == 'edit' , the string is at the top of the page.
How do I do to pass the $crud->getStateInfo()->primary_key for edit.php or to put this "primary_key" side of the cancel button for example?
Posted 18 February 2014 - 19:19 PM
you asked about adding custom buttons on an edit form, if i've read correctly. in the edit state, the key is in a URL segment. have the controller use that to build the URL string you need then use your view to inject code for a button into the body. i do this sort of hing s often that my views have more hooks than anything else, and end up having mostly stuff like this: