I have the same doubt the acontreras.... how to pass the primary key.... somebody knows?
- grocery CRUD website →
- grocery CRUD forum
- → Viewing Profile: Posts: Felipe Matos
Community Stats
- Group Members
- Active Posts 11
- Profile Views 5,746
- Member Title Member
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Not Telling
Contact Information
Posts I've Made
In Topic: [WORKAROUND] Redirect to the list after insert/update without changing the co...
12 February 2014 - 06:04 PM
In Topic: Add Action with Edit Page
24 January 2014 - 12:02 AM
Hi - web-johhny just added ids to the div tags so you can insert your own action buttons using Javascript/jQuery a lot easier. Be sure to download the latest files from github to make use of it
A quick example of adding a quick button calling a custom javascript function:
$(document).ready(function(){ $('.pDiv').append('<div class="form-button-box"><input type="button" value="Custom" onclick="javascript: custom_function()"></div>'); });also you can specify which state to add it to. For example if you want to just use the "edit" state and not the "list" state you can do something like this:$state = $this->grocery_crud->getState();if($state == "edit") { //insert your code here - will only display on the edit state }
In Topic: Delete button on edit view
08 January 2014 - 01:54 PM
Hi everybody,
Thanks for the Grocery Crud, is very usefull.
My doubt is how I fix the problem of the prompt messege.
I try the getState == 'delete' but I dont give sucess!
Someone help?
Sorry my english!
In Topic: Add custom action button in edit form
06 January 2014 - 12:51 PM
Hello and welcome to the forums 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?
In Topic: SET type interface with checkbox
08 November 2013 - 06:42 PM
Sorry my english.
- grocery CRUD forum
- → Viewing Profile: Posts: Felipe Matos
- Privacy Policy