As above, I’d like to default some of my date fields to today’s date so that the user doesn’t have to choose a date if they want today’s date to appear. How do I do this?
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
January 05, 2011 7:45am
Subscribe [2]#1 / Jan 05, 2011 7:45am
As above, I’d like to default some of my date fields to today’s date so that the user doesn’t have to choose a date if they want today’s date to appear. How do I do this?
#2 / Jan 05, 2011 4:11pm
You could do that easily with an SAEF, I suppose. For the Control Panel you might need an extension or something similar; consider making a Feature Request, too.
#3 / Feb 25, 2011 7:08am
Thanks but how do I do it with an SAEF?
#4 / Feb 25, 2011 9:24am
You’d create a regular SAEF, then preset the date field with today’s date, probably using a line of jQuery or Javascript. Moving to the CodeShare Corner.
#5 / Feb 28, 2011 8:30am
I thought when yoyu created custom fields and and assigned those to a channel to create a form, that was an SAEF. However, it looks to me now that an SAEF is a hard-coded form which would be ideal for what I’m trying to do. I cannot however, find much information on SAEFs so could someone please direct me to some learning material on SAEFs?
#6 / Feb 28, 2011 10:44am
For EE2, lots of changes happening now with regard to SAEF - they’ve just brought SafeCracker (an SAEF-enabling add-on previously available separately from Barrett Newton) into the EE2 fold. If you download SafeCracker, you also get documentation and examples with it, so that might be a good place to start - just look in your downloads page on expressionengine.com and you’ll find SafeCracker there now, if you currently have at least one EE2 license.
#7 / Feb 28, 2011 2:56pm
Start here, please: http://ellislab.com/expressionengine/user-guide/modules/channel/entry_form.html