Below is the ACF form I used prior to leaving my comment. When viewing the form on the front-end, only the recaptcha was visible until you tick the box and then submit, then the full form appears. Doing this created an empty “open_house” post. And actually for some reason, it created two at the exact same time.
Submitting the full form after the recaptcha worked, though.
$args = array(
'post_id' => 'new_post',
'post_title' => false,
'post_content' => false,
'new_post' => array(
'post_type' => 'open_house',
'post_status' => 'publish'
),
'field_groups' => array(
'group_59bae2a7e074a' // Open House Details
),
'fields' => array( 'field_59c3114cf1839' ), // Recaptcha field from an active field group
'recaptcha' => 'true',
'submit_value' => 'Add Listing',
'updated_message' => 'Listing created successfully',
'return' => add_query_arg( array( 'h_action' => 'edit', 'h_id' => '%post_id%', 'updated' => 1), get_permalink() ),
);
acf_form($args);
Later on, I tried a second time with a different ACF form with an inline ReCAPTCHA field. This one showed the entire form along with the recaptcha. This was for an event post type with different fields.
However, when submitting this form it also created empty events. This also made it so ajax validation didn’t work – if you have an error it goes to a new page and gives you a screen of error messages in a wp_die() dialog. Without the recaptcha field, trying to submit with errors would highlight the bad fields in red without reloading the page.
$args = array(
'post_id' => 'new_post',
'post_title' => true,
'post_content' => false,
'new_post' => array(
'post_type' => 'event',
'post_status' => 'pending'
),
'field_groups' => array(
'group_59c2a8fd60859' // Event Details
),
'submit_value' => 'Add Event',
'updated_message' => 'Event created successfully',
);
acf_form($args);
Note for the second one: I added the recaptcha field to the field group seen in that code. I added the keys appropriately, and made the recaptcha required. I also turned on the switch at the bottom of the ACF settings that said it requires the recaptcha field to submit (I don’t remember the exact verbiage of that checkbox though).
Hope that helps.