getting "To" email value from a...

User 2794810 Photo


Registered User
6 posts

Hi all,
Having used form builder to create a form I want to be able to replace the "To" email address in the notification email with the content of a variable. I assume this means finding a way to replace the "To" element in form.cfg.php with the value of the variable but I haven't a clue whether a) if it can be done or b) how to achieve this.

The php used to open the table and populate the forms host page is
// load record from 'advertisers'
list($advertisersRecords, $advertisersMetaData) = getRecords(array(
'tableName' => 'advertisers',
'where' => whereRecordNumberInUrl(0),
'loadUploads' => true,
'allowSearch' => false,
'limit' => '1',
));
$advertisersRecord = @$advertisersRecords[0]; // get first record
if (!$advertisersRecord) { dieWith404("Record not found!"); } // show error message if no record found


The variable that I need to have replace the "To" field in form.cfg.php is
<?php echo htmlencode($advertisersRecord['email_address']) ?>


I am not a php programmer so would appreciate anyone's help in pointing me in the right direction to achieve what I am looking to do.

Thanks in advance for any help provided.

User 187934 Photo


Senior Advisor
18,132 posts

Hi Steve,
Can you get the variable when the form loads?
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

Here's my S-Drive site with
examples of what can be accomplished in VSD.
http://progrower.coffeecup.com/
Here's my CoffeeCup SCCP Shop with examples of what can be done.
http://progrower.coffeecup.com/shop/
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personnel site used for testing and as an easy way to share photos.(RLM imported to RSD)
http://ericrohloff.com
http://ericrohloff.com/property/

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.