What is the best way to add pre-created fields to forms in Mautic?

Hello everyone,

I am creating a theme and I would like my theme to have pre-created fields such as name, email, and message when creating a form, instead of the user create then one by one.

I attempted to manually add these fields to the form.html.twig file, but the information is not sent after the user fills it out.

image

If anyone knows if this is possible or not to achieve only with the theme, I would greatly appreciate your help!

Thank you.

You can clear your mautic cache firstly and then create a different form with only one field like email or name etc, and then submit that form anywhere by rendering it, and then go to that form in mautic and see form submission section , you will see the form submitted data there.

1 Like

Hi Mister @asad786

Thanks for your reply. I did exacly now as you explained, and sadly I am not receiving any data:

In the form results, It doesn’t add the column with the respected field that I created.
image

Is your question: how to make a Form Template in a way, that Fields are already added?

Joey

1 Like

Hi Mister @joeyk

Thats correct yes

No, you can’t do that.
The fields are saved in the DB in multiple tables.
The fields themseves have nothing to do with Templates.

1 Like

Thanks once again for your help Mister @joeyk
Your help really means a lot :smiley:

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.