How to pass URL parameters to a form

I have working see:

1 Like

Hey so I always say this, and it is the beauty of Mautic, that there are really many ways to do something.

In the case of what you want to do Mautic actually has a specific module defined for this which is the preference center.

Steps to create the preference center are as follows:

  1. Go to Components - > Landing Pages
  2. Click New and in the setting of the new page choose that this is a presence center:
  3. Go ahead and build your page using the page builder
  4. When you build the mailer you want to send out you then need to define that the unsubscribe url should use the preference center landing page:
    image

thank you for your replies @mikew and @patrickeidemiller , I just wanted to ask that if I don’t want to create a landing page and directly want to use
image
unsubscribe feedback form, so pre-fetching won’t be possible there?

mautic-form-preload.js this works with query params to landing page.

what about to add form directly to website?
i.e. if i want to add form to my website using below script:

<script type="text/javascript" src="https://localhost:8012/mautic/form/generate.js?id=3&tenancy_name=utsavtech">

where tenancy_name is a hidden field and it doesn’t pre-populated.

Did it work with you? I’ve just tried but didn’t work. I need to send a value from my website through the form to know if the visitor subscribe from the footer or the popup. Any inputs would be appreciated.

Hi,
This form is just a regular form.
Are you trying to save the form result of that specific field? (Unsub reason?)

Hi. Yes. Because I want to use the form in different places. For example, in the footer and in the popup (focused item). So I want to see from where leads come. I added the form to the footer by embedding the JavaScript link for the form. I created hidden input for this form (formsource) and in the JavaScript link I added: &formsource=footer. But, I got nothing in the hidden input (formsource) and didn’t work. Any hints on how to achieve this?