Menu
Close menu

af/form/zapier/request

Change the Zapier API request before it’s sent.

<?php

function modify_zapier_request( $request, $form, $args ) {
  // Combine two fields and send to Zapier with key "full_name"
  $full_name = af_get_field( 'first_name' ) . ' ' . af_get_field( 'last_name' );
  $request['body']['full_name'] = $full_name;

  return $request;
}
add_filter( 'af/form/zapier/request/key=FORM_KEY', 'modify_zapier_request', 10, 3 );

Modifiers

  • af/form/zapier/request Applies to all forms.
  • af/form/zapier/request/key=FORM_KEY Applies to forms with specific key.
  • af/form/zapier/request/id=FORM_ID Applies to forms with specific post ID.