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

A place for users and developers of the Xataface to discuss and receive support.

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

Postby xenajo » Tue Jul 05, 2011 7:41 am

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
xenajo
 
Posts: 6
Joined: Thu May 19, 2011 6:16 am

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

Postby ADobkin » Tue Jul 05, 2011 8:21 am

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=5028

This 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=4004

Lastly, 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=3988

Alan
ADobkin
 
Posts: 195
Joined: Mon Oct 22, 2007 7:31 pm
Location: Atlanta, GA, USA

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

Postby ADobkin » Tue Jul 05, 2011 8:49 am

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__default

Alan
ADobkin
 
Posts: 195
Joined: Mon Oct 22, 2007 7:31 pm
Location: Atlanta, GA, USA


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 17 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved