When I use the set_relation for a dropdown, it stores the ID value of that record. How do I get the actual value of the dropdown being stored?
$crud->set_relation('Destination','Destination', '{Destination} ({City} {State})');
Thank you.
⚠ 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 04 April 2014 - 16:44 PM
When I use the set_relation for a dropdown, it stores the ID value of that record. How do I get the actual value of the dropdown being stored?
$crud->set_relation('Destination','Destination', '{Destination} ({City} {State})');
Thank you.
Posted 06 April 2014 - 05:23 AM
well there are 2 ways,.. 1 is... create a custom dropdown.. using field_type to enum with array of values to use.
Second way if you plan to store the value --- u can do a callback before insert and retrieve the value and store it in...
which ever way u like it.. u can go with it.
Happy GCing:)
Posted 07 April 2014 - 12:21 PM
Thank you.