how to preset field values in a 'new record' form

Posted:
Tue Jul 05, 2011 7:41 am
by xenajo
Hi,
is it possible to preset somes field values in a 'new record' form ?
I would like to preset a calendar type field value with the current date, a select type field value with the name of the current user, and a checkbox type field value with a default value
thanks for your help
Re: how to preset field values in a 'new record' form

Posted:
Tue Jul 05, 2011 8:21 am
by ADobkin
xenajo,
This forum thread will help you with setting defaults field values in general using the fieldname__default delegate class function:
Pre-entered Data
http://xataface.com/forum/viewtopic.php?t=5028This forum thread explains alternate methods to use specifically with a date/time field:
How to initialize a Date field to today's date?
http://xataface.com/forum/viewtopic.php?t=4004Lastly, this forum thread provides a solution to populate the current user:
Setting default select setting from users table
http://xataface.com/forum/viewtopic.php?t=3988Alan
Re: how to preset field values in a 'new record' form

Posted:
Tue Jul 05, 2011 8:49 am
by ADobkin
FYI, I have created a new wiki page on this topic using Steve's responses to the forum posts mentioned above.
http://xataface.com/wiki/fieldname__defaultAlan