Just in case anyone's interested in this, I've figured out how to have a form automatically submit to the author of the post the page appears on.
<?php
$author_email_addy = get_the_author_meta( 'user_email' );
gravity_form(
3,
$display_title=false,
$display_description=true,
$display_inactive=false,
$field_values = array(
'author_email'=> $author_email_addy
),
$ajax=true
); ?>
The3
is the ID of the form, FYI, and I'm doing this all via a function call, not using the shortcode / WP Post Editor.
Note the 'author_email'=> $author_email_addy
, this is the important part.
- Add an
Email
field (from the Advanced Fields in the Form Editor) to your form. - Editing that field, click the Advanced tab
- Click Allow Field to be Populated Dynamically, and enter
author_email
as the value. - Save the form and go to Notifications
- Scroll down and tick the box Notification to Users
- In the Send To: field, choose the Email field from step 1 above
That's it!