-
Notifications
You must be signed in to change notification settings - Fork 67
Cherry-pick: "Update forms.rst" to 5.2 #623
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 5.2
Are you sure you want to change the base?
Conversation
Added the tokens that can be used in a form submit action.
Co-authored-by: Ruth Cheesley <[email protected]>
Co-authored-by: Ruth Cheesley <[email protected]>
Co-authored-by: Ruth Cheesley <[email protected]>
docs/components/forms.rst
Outdated
| 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. |
There was a problem hiding this comment.
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:
- Brief description about what token is and why folks want to use them
- 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!
There was a problem hiding this comment.
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:
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:
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * **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. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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!

Description
This PR cherry-picks #316 into the 5.2 branch, following the
mautic/mauticmilestones.Referring to the
mautic/mauticPR:Linked issue
Screenshots or screen recordings