Hi,
How can I set value for a field that will not appear in the form?
I need to set a value for update operation hidden from the user.
Thanks
⚠ 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 24 May 2013 - 01:52 AM
Hi,
How can I set value for a field that will not appear in the form?
I need to set a value for update operation hidden from the user.
Thanks
Posted 24 May 2013 - 06:07 AM
When you $crud->field_type('office_id', 'hidden', $office_id);
you use the third parameter of the function to store a value to the field.
This works only for:
hidden, enum and set field and it is not a default value for all the other types.
Read the manual here.
Posted 24 May 2013 - 14:34 PM
Posted 25 May 2013 - 05:01 AM
Most of the times it will be a callback.
But it all depends on the logic of your app.