Jump to content

FormBuilder - How get Values in custom autoresponder email?


Erik Richter
 Share

Recommended Posts

Hey guys, this is my customized autoresponse (put into the template folder)


if(!defined("PROCESSWIRE")) die();

?><!DOCTYPE html>
<html>
<head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<title><?php echo $form->name; ?> auto-response</title>
</head>
<body>

<p>Hello <?php echo $values['first_name']; ?> <?php echo $values['last_name']; ?></p>
    <p> Please activate your account here: <br>
    <?php echo $pages->get(11084)->httpUrl;?>confirm?token=<?php echo $values['confirmation_token']; ?></p>
    <p>Thank you</p>

</body>
</html>

first_name, last_name and confirmation_token are the field names. Email is sent, but I get "Notice: Undefined variable: first_name in" and "Notice: Trying to get property 'value' of non-object" for each. 

So what is the correct way to get single field values out of the array? Looks like I am making a beginner mistake here.. 

Appreciate your help ?

Link to comment
Share on other sites

  • 3 weeks later...

Hey @Erik Richter,

FormBuilder questions would be best posted to the FormBuilder VIP support area, which you get access when you purchase a license. If you have bought a license and still don't have access, be sure to contact Ryan to get it sorted out ?

To me it looks like the code you've posted and the error you're seeing are not directly related: the notice suggests that you're using $first_name, while in the code you're clearly referring to $values['first_name']. I'm not really familiar with how the autoresponder logic works, so perhaps there's an explanation for this, but in the meantime I'd make sure that this really is the code you're running.

Since the modules section of the forum is only intended for module-specific support threads — one per module — I'm moving this topic into General Support. Perhaps someone can help you there.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...