Customizing my form

Hello! I’m with a problem customizing my form. I followed the steps here https://developer.mautic.org/#form.html.twig, so i created a folder called “MauticFormBundle” in my custom theme “[customName]/html/”. Then i put two new folder inside, “Field” and “Builder”.



Now i copied all files inside “app/bundles/FormBundle/Views/Builder/” to my custom theme folder “Builder” and the same for this folder “app/bundles/FormBundle/Views/Field/” to my custom theme folder “Field”.



I tried change the file “form.html.php” inside my custom theme “Builder” and the changes reflected, so ok.

Then i tried to change “group.html.php” inside of my custom theme “Field” and the changes didn’t reflected. And that is my problem.



When i tried to change the file in this folder “app/bundles/FormBundle/Views/Field/group.html.php” the changes refleced but in a future update this will be erased once this is a root folder of Mautic.

Hello! I’m with a problem customizing my form. I followed the steps here https://developer.mautic.org/#form.html.twig, so i created a folder called “MauticFormBundle” in my custom theme “[customName]/html/”. Then i put two new folder inside, “Field” and “Builder”.

Now i copied all files inside “app/bundles/FormBundle/Views/Builder/” to my custom theme folder “Builder” and the same for this folder “app/bundles/FormBundle/Views/Field/” to my custom theme folder “Field”.

I tried change the file “form.html.php” inside my custom theme “Builder” and the changes reflected, so ok.
Then i tried to change “group.html.php” inside of my custom theme “Field” and the changes didn’t reflected. And that is my problem.

When i tried to change the file in this folder “app/bundles/FormBundle/Views/Field/group.html.php” the changes refleced but in a future update this will be erased once this is a root folder of Mautic.

I know this is a old issue, but I am currently having the same issue, files inside the Field folder are never picked up, I could not find any solution in the forum

any update about this issue?

actually, not only the fields, but anything related to form on my custom theme is being applied

finally found the problem, after a lot of time, stress and angry, the power of stubbornness prevailed!
this fixed bug give me the hint: issue with html.php extension files during importing a template · Issue #6348 · mautic/mautic · GitHub

To solve the issue, I need to go to Configuration → theme and add php as one of the allowed assets

also, if you want to add your own custom template for each type of field, you need to specify the name of your theme in the php file, or else the template will used the default php file to render the field:

image

this is the minimal change you need to do to start changing the render of the form on your template, I will be sharing more of my personal experience once I finish this template I am working on.