Bio Page Dynamic Gravity Form

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:

  1. Name
  2. Email Address (with email confirmation - users must enter it twice)
  3. Message
  4. 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!

Hi Michael,

A few things need to be clear:

  • How did you create the Bio page? Did you use a general page or a custom post type (CPT)?
  • What is the URL/permalink structure you’re using?

Please provide all the details necessary for us to understand clearly and find a solution for you. Thank you.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.