Filters and Hooks

Add Custom Fields to the Contact Form

Filter or Hook ID: mam_gf_get_form_settings_fields_contact_form

You can add fields to the contact form using Gravity Forms, then map and mange these fields in your plugin. add_filter( ‘mam_gf_get_form_settings_fields_contact_form’, ‘my_fields’ ); function my_fields( $fields ){ //add to the array of fields $fields[] = array( ‘title’ => ‘Street’, ‘slug’ => ‘street’ ); $fields[] = array( ‘title’ => ‘City’, ‘slug’ => ‘city’ ); $fields[] = array( ‘title’ => ‘State’, ‘slug’ => ‘state’ ); $fields[] = array( ‘title’ => ‘ZIP’, ‘slug’ => ‘zip’ ); return $fields; } You can then map these fields in Mobile App Manager -> Gravity Forms -> Field Settings
Doc Status: Public

mam_contact_form_contact_processed

Filter or Hook ID: mam_contact_form_contact_processed

After a contact form is processed, this action is called to allow you to do anything needed before returning the response to the user.

This hook has no parameters.

add_action( ‘mam_contact_form_contact_processed’, ‘post_form_function’ );
function post_form_function()
{
//do stuff

}

Doc Status: Public

mam_contact_form_populate_contact

Filter or Hook ID: mam_contact_form_populate_contact

This filter can be utilized to populate custom fields that you may have added to the form.

add_filter( ‘mam_contact_form_populate_contact’, ‘my_form_fields’, 10, 1 );
function my_form_fields( $form )
{
//populate fields

return $form;
}

Doc Status: Public