am-impact / amforms

Forms plugin for Craft
Other
121 stars 21 forks source link

Change default field templates #167

Open janmeeus opened 6 years ago

janmeeus commented 6 years ago

Is there a way to have custom markup for all the field types that are included in forms.twig ?

For example: I would like to change the markup (html, class…) of _includes/forms/text.html or _includes/forms/checkbox.html.

But instead of just changing the files in the _display/templates/_includes, I would like to overwrite them in my own /craft/templates/_amforms/_includes folder. Moving forms.twig and the _includes to this folder doesn't seem to work.

chromadesign commented 6 years ago

I would be interested in that as well!

DHoogland commented 6 years ago

I'm running into this issue too. I want to make a zip code field that autocompletes the address in the form, with disabled street/city field.

DHoogland commented 6 years ago

I was able to overwrite the text field, having some trouble with the checkbox at the moment. Will update when I find a solution.

This is how I fixed my text field: Try to set the to the path in the settings to the directory where the twigs are. If you use the default names/copied the amforms templates, you don't have to enter the filename at the end. If you use custom names, add the custom name at the path too, without extension.