Goal
Add a working Contact Us form to your mobile app, accessible from either the main navigation or the left menu, with submissions delivered to an admin email. This recipe uses the built-in MAM form handler — no external form plugin required.
If you need to design the form using Gravity Forms’s drag-and-drop UI, use Recipe: Setting up a contact form with Gravity Forms instead.
Prerequisites
- WordPress admin access
- MAM Suite installed, with
mam-mainandmam-contact-formactivated under Mobile App Manager → Software
If mam-contact-form is not installed, see Plugin: mam-contact-form for installation steps.
What you get out of the box
When the plugin is activated, the contact form is already defined with the six default fields:
| Field | Slug | Notes |
|---|---|---|
| Name | name |
Auto-populated from the user’s WordPress profile (first_name + last_name) when signed in |
email |
Auto-populated from user_email; pre-configured for the email keyboard |
|
| Phone | phone |
Auto-populated from billing_phone user meta when present; pre-configured for the phone keyboard |
| Contact Reason | reason |
Free-text on the default path — turn into a dropdown via Recipe: Enabling multiple contact reason types |
| Subject | subject |
Free text |
| Description | description |
Multi-line text |
You do not need to define these fields manually. You only need to configure where notifications go and where the form appears in the app.
How submission flow works on this path
Mobile app POSTs the form data
└── mam-gravity-forms-manager validates and routes to the contact form handler
└── mam_contact_form_manager::process_contact_form( $values )
├── Confirms the user is signed in (rejects with an error if not)
├── Re-fetches field definitions and form data
├── Builds one notification message per WordPress administrator
├── do_action( 'mam_notification_send_message', $messages ) — dispatches admin emails
├── do_action( 'mam_contact_form_contact_processed', $values, $form_data )
└── Returns the confirmation message to the app
Anonymous submissions are rejected with "You must be logged in to submit this form.". The plugin treats mam_user_id() as required.
Steps
1. Configure the notification email
Go to Mobile App Manager → Contact Form. Enter the email address that should receive submissions in the Notification Email field. Save.
By default, the plugin emails every WordPress administrator on the site. The Notification Email field overrides that to a single address.
If you want different reasons (e.g., Sales vs. Support) to route to different addresses, see Recipe: Enabling multiple contact reason types — you can come back to that after the basic setup is verified.
2. Add the form to the app
Go to Mobile App Manager → App Setup. In the navigation editor, add a new item and choose the contact form from the dropdown. Place it on either the main tab bar or the left menu, then save.
You can place the form in both locations if you want; they reuse the same form ID.
3. (Optional) Add custom fields via code
If the six defaults aren’t enough, add fields programmatically via the mam_gf_get_form_settings_fields_contact_form filter. See Hook: mam_gf_get_form_settings_fields_contact_form for the full pattern.
This is the right tool when:
- The fields are stable and known at code time
- You want them to ship as part of a custom plugin alongside
mam-contact-form
If the fields might change frequently or you want a non-developer to manage them through a UI, switch to the Gravity Forms path instead.
4. (Optional) Pre-fill custom fields
If you added custom fields in step 3, pre-fill their values via mam_contact_form_populate_contact. The default Name, Email, and Phone fields are already pre-filled by core; you only need this for fields you’ve added yourself. See Hook: mam_contact_form_populate_contact.
Verification
To confirm everything is wired up:
- Open the mobile app and tap the contact form entry. The form should render with all six fields.
- If you’re signed in and your WordPress profile has a name, email, or phone, those fields should be auto-populated.
- Submit the form with test data.
- Check the email inbox configured in step 1 for the notification.
- If a custom hook is registered, confirm the side-effect (CRM record, log entry, etc.) shows the test submission.
If any step fails:
- The form is missing → confirm
mam-contact-formis activated under Software for the role you’re testing as. - Submission silently fails → confirm you’re signed in. The default path rejects anonymous submissions.
- The email never arrives → confirm a Gravity Forms notification is configured (the default path delegates dispatch through the GF notification system).
When to switch to the Gravity Forms path
Stay on the default path unless you need one of these:
- Drag-and-drop form design in WP Admin (no code)
- Gravity Forms conditional logic
- Gravity Forms add-ons (CRM connectors, payment add-ons, etc.)
- An existing Gravity Forms form you want to reuse
Switching paths is non-destructive — you can move from default to Gravity Forms (or back) without losing existing submissions, since notifications and entries are tracked separately on each path.
Related articles
- Plugin: mam-contact-form
- Recipe: Setting up a contact form with Gravity Forms
- Recipe: Enabling multiple contact reason types
- Hook: mam_gf_get_form_settings_fields_contact_form
- Hook: mam_contact_form_populate_contact
- Hook: mam_contact_form_contact_processed
Metadata
| Field | Value |
|---|---|
| Article type | Recipe (Admin) |
| Plugin slug | mam-contact-form |
| Applies to plugin version | 2.1+ |
| Category | Building Your App |
| Audience | WordPress admin |
| Estimated time | 5 minutes |
| Applies to setup paths | Default path |
| Last verified | 2026-05-01 |
