Skip to content

Conversation

@adiati98
Copy link
Contributor

@adiati98 adiati98 commented Jan 26, 2026

Description

This PR cherry-picks #316 into the 5.2 branch, following the mautic/mautic milestones.

Referring to the mautic/mautic PR:

Linked issue

Screenshots or screen recordings

putzwasser and others added 5 commits January 26, 2026 15:43
Added the tokens that can be used in a form submit action.
@adiati98 adiati98 requested a review from a team as a code owner January 26, 2026 15:00
@adiati98 adiati98 requested review from favour-chibueze and removed request for a team January 26, 2026 15:00
@adiati98 adiati98 added this to the Mautic 5.2.3 milestone Jan 26, 2026
@adiati98 adiati98 moved this to 🔎 In review in Mautic's No/Low/Code Tasks Jan 26, 2026
Comment on lines 72 to 76
Mautic parses the following tokens in the **Redirect URL/Message** field:

* ``{contactfield=ALIAS}`` replacing it with the value of the current Contact's field, if any.
* ``{formfield=ALIAS}`` replacing it with the value entered into the specified Form's field, if any.
* ``{pagelink=PAGE_ID}`` replacing it with an absolute URL to the Landing Page with the specified ID.
Copy link
Contributor Author

@adiati98 adiati98 Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mautic/core-team @RCheesley

I feel like these are a bit technical for user docs. Also, it's not clear with what value should we replace the ALIAS and PAGE_ID. I could find the info on how to use PAGE_ID from the PR at Mautic. But what to fill in for {contactfield=ALIAS} and {formfield=ALIAS}?

I think, we might want to update this to better inform users with below details:

  1. Brief description about what token is and why folks want to use them
  2. How to use {contactfield=ALIAS}, {formfield=ALIAS}, and {pagelink=PAGE_ID}. What field do they need to replace the values with?

If anyone can give me info about what value to replace both aliases, I can try to refine this. Thanks!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case of {contactfield=ALIAS} the user must provide the alias of the contact field. In M7 the whole token is available in the UI:

Image

For {formfield=ALIAS} it's pretty much the same thing but I can't find the form field alias being available anywhere in the UI. @mautic/ux-ui-tiger-team we have a space for improvement here.

And for {pagelink=PAGE_ID} it's the ID visible for the landing page:

Image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the info, @escopecz! ✨

In M7 the whole token is available in the UI

This feature started from M5. So, if they're not available in the UI, how can users find them? Or where should they look into?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In previous version there was a "alias" column instead. So still usable for custom/contact/company fields:
Screenshot 2026-01-26 at 16 58 26

@adiati98 adiati98 requested a review from RCheesley January 26, 2026 15:30
@adiati98 adiati98 mentioned this pull request Jan 26, 2026
@adiati98 adiati98 marked this pull request as draft January 27, 2026 10:09
Comment on lines 77 to 103
* **Redirect URL/Message** - If you decide to use the **Successful Submit Action** of:

* **Redirect URL**: paste the URL where you'd like to direct submitters
* **Display message**: enter the message to display

For these options, you can use placeholders to personalize the experience for your Contacts. Mautic automatically replaces these placeholders with specific details when the Contact submits the Form:

.. vale off

.. list-table::
:widths: 25 35 40
:header-rows: 1

* - Placeholder
- Replace with
- How to find the value
* - ``{contactfield=ALIAS}``
- Replace ``ALIAS`` with a value from the Contact's field.
- Refer to :doc:`/contacts/custom_fields` to find aliases in the Custom Fields.
* - ``{formfield=ALIAS}``
- Replace ``ALIAS`` with the Form's **Matching field**.
- If you haven't set one yet, click the pencil icon on the field card to edit it, then select a field under the **Mapped Field** tab.

Once updated, in the **Fields** tab, look at the bottom of the field's card. Use the lowercase version of the text shown after **contact:** for ``ALIAS``. For example, use ``timezone`` if the card shows ``contact: Timezone``.
* - ``{pagelink=ID}``
- Replace ``ID`` with a link to a Mautic Landing Page.
- Go to **Components > Landing Pages** and look at the **ID** column.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mautic/core-team @RCheesley

I've updated (kind of overhaul) these parts. It'd be great if you can help to check the content, especially how to find and replace ALIAS in the {formfield=ALIAS}. I tried out every possible things for this part, and guessing this is how to find it. But I might be wrong. TIA! ✨

Here's the live preview for better read: https://mautic-documentation--623.org.readthedocs.build/en/623/components/forms.html#details

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the best we can do at this point. Thank you!

escopecz
escopecz previously approved these changes Jan 27, 2026
@adiati98 adiati98 marked this pull request as ready for review January 27, 2026 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🔎 In review

Development

Successfully merging this pull request may close these issues.

3 participants