I’ve created a form in Adobe Muse - which only allows for a static form name, which appears to be stored in an associative array named form in a PHP file. I am wondering if it is possible to edit the code to make the Subject line (Row 13) dynamic, where it will equal the date and time that the form was submitted, instead of the static text string ‘New Form Submission’?
Here is some of the PHP code (I didn’t copy the complete file, but most of what you probably need to see)
Thanks in advance for your help!
[php]<?php
/*
If you see this text in your browser, PHP is not configured correctly on this hosting provider.
Contact your hosting provider regarding PHP configuration for your site.
PHP file generated by Adobe Muse CC 2015.2.0.352
*/
require_once(‘form_process.php’);
$form = array(
‘subject’ => ‘New Form Submission’,
‘heading’ => ‘New Form Submission’,
‘success_redirect’ => ‘’,
‘resources’ => array(
‘checkbox_checked’ => ‘Checked’,
‘checkbox_unchecked’ => ‘Unchecked’,
‘submitted_from’ => ‘Form submitted from website: %s’,
‘submitted_by’ => ‘Visitor IP address: %s’,
‘too_many_submissions’ => ‘Too many recent submissions from this IP’,
‘failed_to_send_email’ => ‘Failed to send email’,
‘invalid_reCAPTCHA_private_key’ => ‘Invalid reCAPTCHA private key.’,
‘invalid_field_type’ => ‘Unknown field type ‘%s’.’,
‘invalid_form_config’ => ‘Field ‘%s’ has an invalid configuration.’,
‘unknown_method’ => ‘Unknown server request method’
),
‘email’ => array(
‘from’ => ‘[email protected]’,
‘to’ => ‘[email protected]’
),
‘fields’ => array(
‘custom_U118’ => array(
‘order’ => 1,
‘type’ => ‘string’,
‘label’ => ‘Name’,
‘required’ => true,
‘errors’ => array(
‘required’ => ‘Field ‘Name’ is required.’
)
),
‘Email’ => array(
‘order’ => 2,
‘type’ => ‘email’,
‘label’ => ‘Email’,
‘required’ => true,
‘errors’ => array(
‘required’ => ‘Field ‘Email’ is required.’,
‘format’ => ‘Field ‘Email’ has an invalid email.’
)
),
‘custom_U104’ => array(
‘order’ => 3,
‘type’ => ‘string’,
‘label’ => ‘Company’,
‘required’ => true,
‘errors’ => array(
‘required’ => ‘Field ‘Company’ is required.’
)
),
‘custom_U123’ => array(
‘order’ => 4,
‘type’ => ‘string’,
‘label’ => ‘Work Address’,
‘required’ => true,
‘errors’ => array(
‘required’ => ‘Field ‘Work Address’ is required.’
)[/php]