imo, u dont want to set date_created as hidden field. unset this field
in your form and set this object attribute if u save this new object.
$myObject-setDateCreated(new DateTime());
$myObject-save();
Am 08.10.2010 00:04, schrieb Manu SW:
Hi again,
I am back with another problem in the same
symfony's schema can create be used to automate this for you. In your
schem.yml just create a null-value created_at field:
table_name:
field1: { ... }
field2: { }
created_at: ~
symfony will automatically add the date into the created_at field of your
table everytime a record is
Hi ! Thanks a lot for your help. Replying below ...
Gareth McCumskey wrote, On 10/8/10 8:45 AM:
symfony's schema can create be used to automate this for you. In your
schem.yml just create a null-value created_at field:
table_name:
field1: { ... }
field2: { }
created_at: ~
Hi again,
I am back with another problem in the same form : I can't get a hidden
field to get initialized with a default value.
This is a portion of my code :
$this-setWidgets(array(
'object_id'= new sfWidgetFormPropelChoice(
array('model' = 'BioObject', 'add_empty'
I`m using:
$this-widgetSechema['user_id'] = new sfWidgetFormInputHidden();
$this-setDefault('user_id', sfContext::getInstance()-getUser()-
getGuardUser()-getId());
in order for the user_id field to be invisible, and automatically
populated,
but instead it shows as a text input, with the value
What code are you using to fill the field? Technically you should
set defaults for the hidden fields in your action after instantiating
the form object before it is rendered. At least, thats the way I
know...
$this-new_form = new FormObjectWithHiddenField();
Hello all.
I'm trying to fill a hidden field but when i summit the form a get the
following error msg invalid for that field.
I what the fill hidden field. Is this possible?
# $form['idrecibo'] (sfWidgetFormInputHidden)
Invalid.
thank you.
--
If you want to report a vulnerability issue on