Hello Gravity Forms community,
I hope this message finds you well. I’m currently working on a project that requires converting a form into a Gravity Form and implementing a modal launch using Featherlight. I would greatly appreciate your expertise and guidance on this matter.
Here are the details of the request:
Form Fields:
- Name
- Email Address (with email confirmation - users must enter it twice)
- Message
- Silent Recaptcha
Acceptance Criteria:
- The form should be a single Gravity Form.
- Utilize Gravity Forms filtering to identify the ID/email address of the person whose page the user is on.
- The notification should be sent to the identified person instead of the default WP admin notification.
I currently have this worked up but its not working as intended:
// GFORM_NOTIFICATION
add_filter( 'gform_notification', 'append_email', 10, 3 );
function append_email( $notification, $form, $entry ) {
// get email address from hidden field w/ ID of 5
$contact_email = $entry[5];
// append email address to notifications objects
$notification['to'] .= ', ' . $contact_email;
return $notification;
}
If anyone could provide guidance, code snippets, or any recommendations on how to achieve this, I would be extremely grateful.
Thank you in advance for your assistance!