In prior versions of CF, I would use PHP code like below in a Custom Code action to set values when a form was opened:
Can anyone point me to something that could explain this to me?
Rick
<?phpUsing CFv6, I am completely confused how to do something similar. I have the documentation, but I am ashamed to admit that I cannot figure out how to do what I want.
$today = date("Y-m-d h:i:s");
$form->data['pr_datestamp'] = $today;
$thisdate = date("m/d/Y");
$form->data['pr_date'] = $thisdate;
$form->data['pr_ip'] = $_SERVER['REMOTE_ADDR'];
?>
Can anyone point me to something that could explain this to me?
Rick
Hi Rick,
The code you need for CFv6 has changed - you can see examples at the foot of Page 34 of the manual.
Bob
The code you need for CFv6 has changed - you can see examples at the foot of Page 34 of the manual.
Bob
Bob,
I did look at that page. I am just really not sure how to use it. It's embarrassing, but true.
Rick
I did look at that page. I am just really not sure how to use it. It's embarrassing, but true.
Rick
This topic is locked and no more replies can be posted.
