Can anyone advise how I can get the hash from a variable/field so I can include it in my email.For reference, the other 3 fields in this string work, in the email template:Click here to verify this record."> Load Fields Hash...on Submit - Forums

Forums

Load Fields Hash...on Submit

batvink 23 Apr, 2013
I would like to perform the following:

[list]* User fills in a form
* Create a Hash after the form is filled in
* Use this hash in a link in an email.[/list]

This is so that the email recipient can be "verified" when they click the link and go to another form. The hash includes their email address and 2 other key fields. The email contains a full body of text, it is not simply to verify the user.

I have created a Load Fields Hash in the On Submit Event.

I have tried to use the field name {signoff_hash}. For all other fields this works perfectly. But for this field I get %7Bsignoff_hash%7D. It clearly does not find the curly bracket version of the field.

I added the field signoff_hash to the form as a hidden field. Now I get no value at all (the field must now exist but is not populated.

I also tried using PHP once the hidden field exists... this has not worked.

<?PHP echo $form->data['signoff_hash']?>


Can anyone advise how I can get the hash from a variable/field so I can include it in my email.

For reference, the other 3 fields in this string work, in the email template:

<a href="http://ten-net.info/signoff-verify?so={signoff_hash}&works_order={works_order}&contractor_name={contractor_name}&client_email={client_email}">Click here</a> to verify this record.</p>
batvink 23 Apr, 2013
Trying to fix this, I have created my own hash:

<?PHP 
$form->date['signoff_hash'] = hash('MD5', $form->data['works_order'] . $form->data['contractor_name'] . $form->data['client_email']);
?>


This is in custom code in the On Submit. But will this work? Have I returned to the server where the PHP can be run as part of the post-submission process? I am in controller mode.
This topic is locked and no more replies can be posted.