Mautic Community Forums

Input Attributes

I’m attempting to put bootstrap classes on form fields.



First, I noticed that the form file in the theme doesn’t seem to allow styling at that granular a level (based on looking at all themes).



I also looked at forms in the application. I found Input Attributes. I’m not sure I’m using them properly.



The tooltip says to enter something like class=“myclass”. However, if I enter

Code:
class="form-control"
it shows up as
Code:
class=""form-control""
in the form.

I can safely enter:
Code:
class=form-control


However when I get to the submit button I want to add two classes. Uh oh.
Code:
class="btn btn-primary"
it shows up as
Code:
class=""btn"

I’m attempting to put bootstrap classes on form fields.

First, I noticed that the form file in the theme doesn’t seem to allow styling at that granular a level (based on looking at all themes).

I also looked at forms in the application. I found Input Attributes. I’m not sure I’m using them properly.

The tooltip says to enter something like class=“myclass”. However, if I enter

class="form-control"

it shows up as

class=""form-control""

in the form.

I can safely enter:

class=form-control

However when I get to the submit button I want to add two classes. Uh oh.

class="btn btn-primary"

it shows up as

class=""btn"

This looks like a bug to me. Checking it out now.

Thanks,
Alan

I think I figured it out:

https://github.com/mautic/mautic/commit/c87ecf10199152135b9b277cdb777360c4ec2d90