Send email with form contents on form submission
-
Hi, I have a site that uses multiple forms for our pet-sitting service. We want to be notified when any form is updated, and to receive an email with the form contents. We then use automation to parse the email and take appropriate action based on the content.
Right now we use a code snippet that emails us whenever any form is updated (so far, so good!).
`add_action( ‘um_after_user_updated’, function( $user_id, $args, $to_update ){
um_fetch_user($user_id);
$admin_email = UM()->options()->get( ‘admin_email’ );
$profile_url = um_user_profile_url($user_id);
$mail_content = ‘<a href=”‘.$profile_url.'”>’.um_user(‘display_name’).'</a> has updated their profile’;
wp_mail( $admin_email,’Profile updated’, $mail_content );
},10,3 );`What do I need to add here to include the name/content of the submitted form? Surely there’s a way, but I don’t know code… ??
The page I need help with: [log in to see the link]
- The topic ‘Send email with form contents on form submission’ is closed to new replies.