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
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
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.