Autopopulate date

ironlion37 20 Sep, 2011
Is there a way to automatically populate today's date using either a date box or just a regular text field? Another words, I'd like to have an "Order Date" field in my form that is set to whatever the current date is when the user hits the page.

Thank you : )
GreyHead 20 Sep, 2011
Hi ironlion37,

If you want it in the form results drag a Custom Code action into the OnSubmit event and add this code
<?php
$form->data['today'] = date('Y-m-d');
?>

Then you can use {today} in the Email template.

You can change the 'Y-m-d' format string to show other formats - check the PHP manual for what is allowed.

Bob
This topic is locked and no more replies can be posted.