Struggling with pre-populating generated Froms

Hi,



I need to integrate a Form into my customers website with the auto- generation code. i want to pre populate the

generated form (coursenumber) with some values, to implement a simple interface from the customers system to mautic.



When i try something like:


In the customers page, it does not work. (It perfectly shows the form, but it does not populate the input fields)



When testing the form:

http://mautic_url/s/forms/preview/1?email=test%40example.com&kursnummer=34567

It just works fine.



Am I doing something wrong or is this not possible ?



What are my options ?

Hi,

I need to integrate a Form into my customers website with the auto- generation code. i want to pre populate the
generated form (coursenumber) with some values, to implement a simple interface from the customers system to mautic.

When i try something like:

In the customers page, it does not work. (It perfectly shows the form, but it does not populate the input fields)

When testing the form:
http://mautic_url/s/forms/preview/1?email=test%40example.com&kursnummer=34567
It just works fine.

Am I doing something wrong or is this not possible ?

What are my options ?

hi @helmut, I believe the current form pre population is done by reading query parameters in the URL. This would explain why it works when putting the preview URL in the browser.

I’ve written some code in this PR which might do what you need but I’m not sure because I’ve never integrated Mautic forms into other websites. You may want to test it though. Thanks

https://github.com/mautic/mautic/pull/1363

Hi vln104, Thank you very much I will be looking into that!