I really like working with Chronoforms and have lots of successful forms, but now have a problem I can't solve, despite finding apparent solutions in the forum.
I want to add a timestamp to the $form->data array when the form is submitted. The form works well and sends email, writes to a database table and populates a Google spreadsheet properly, so I'm confident that the form works correctly. I'm using GSheet as the data model for the form so I've added a simple custom code entry to the On submit section of the setup as follows:
Unfortunately, it doesn't seem to work. What am I missing? Thanks in advance for any help you can offer.
I want to add a timestamp to the $form->data array when the form is submitted. The form works well and sends email, writes to a database table and populates a Google spreadsheet properly, so I'm confident that the form works correctly. I'm using GSheet as the data model for the form so I've added a simple custom code entry to the On submit section of the setup as follows:
<?php
$form -> data [ 'GSheet' ] [ 'postmark' ] = date ( 'Y-m-d H:i:s' ) ;
?>
Unfortunately, it doesn't seem to work. What am I missing? Thanks in advance for any help you can offer.