You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.
Felice Ostuni edited this page Aug 7, 2014
·
5 revisions
DataForm/Edit supports insertValue() and updateValue() to prefill values on creation and modify.
there is also an "auto" field type that works directly on model, without output.
//default checked checkbox (on creation)$edit->add('visible','Abilitato','checkbox')->insertValue(1);
//default values for hidden fields$edit->add('parent_id', '', 'hidden')->insertValue($parent_id);
$edit->add('updated', '', 'hidden')->updateValue(date());
//default values for auto fields$edit->add('parent_id', '', 'auto')->insertValue($parent_id);