The problem
One form on many pages (listings, CPT posts, product pages) should not always email the same static admin list. The right contact lives on that page—an ACF agent_email, a custom meta key, a listing manager name—and you want it in the To line and in the message body without duplicating forms.
The solution
Sobi Forms Pro can pull values from the page or post where the visitor submitted the form. In admin notifications (and the same tokens in subject/body), use:
| Token | Meaning |
|---|---|
{{acf.field_name}} | ACF field on the source page (when ACF is active) |
{{meta.post.key}} | Native or custom post meta on the source page |
{{meta.post.title}} | Source post title |
{{meta.post.id}} | Source post ID |
Classic setup: a real-estate CPT with ACF agent_email and agent_name → one contact form on every listing → each lead goes to that listing’s agent, with a body like “Bonjour {{acf.agent_name}}…”.
Requires an active Sobi Forms Pro license (same Pro layer as conditional email routing).
Requirements
- Form embedded on a singular page/post (block or shortcode) so WordPress knows the current post
- Values you want in email must exist as ACF fields and/or post meta on that post
- ACF is optional: without ACF,
{{meta.post.*}}still works viaget_post_meta
How to set it up
- Open the form → After submit → Admin notification.
- In Recipients, mix static addresses and tokens, e.g.
- In Content (subject/body), insert tokens from + Var → Custom fields (ACF fields appear in the picker when ACF is active), or type
{{acf…}}/{{meta.post…}}manually. - Save the form.
- Submit a test from a real listing/page that has those fields filled in.
Empty or invalid token parts are skipped. If the meta email is missing, the remaining static addresses still receive the mail—so keep at least one fallback admin when you need a safety net.
How matching works at submit
- The embed records a trusted source post ID for the page where the form was shown.
- Pro freezes (snapshots) the meta/ACF keys referenced in Recipients, subject, body, and routing rules.
- Emails resolve tokens from that snapshot, not from a live re-read of the post later—retries stay stable even if the listing changes afterward.
Forged or unknown post IDs are ignored: meta tokens resolve empty and recipients fall back to your static list.
Typical setups
Listing → agent email
CPT Property + ACF email field agent_email. Recipients: {{acf.agent_email}} (plus an office address if you want a copy).
Personalize the body
Subject: New lead — {{meta.post.title}} Body: greet with {{acf.agent_name}} and include {{all_fields}} for the submission.
Without ACF
Store manager_email as custom post meta. Use {{meta.post.manager_email}} the same way in Recipients or content.
Limits (v1)
- Direct fields on the source post only (no relationship → related CPT hop in the current release)
- Not for options pages or user meta
- Not used on front-end thank-you pages
- Webhook / Brevo / Mailchimp mapping UIs do not expose these tokens yet (email notifications and routing do)