Skip to content

Grunion Contact Form suggestion: make input fields and "push button" class filterable #7613

@jimmyandrade

Description

@jimmyandrade

Often, my themes use a framework such as Bootstrap - which have input & button-specific classes - and it is not good to change the CSS code to change the appearance of the Grunion Contact Form elements.

So my proposal would be to make the class attribute of inputs and buttons filterable, so that I can add the classes I want without having to hack the WordPress core or my CSS framework.

On the inputs, this line is responsible for the class:

$class = $this->get_attribute( 'class' );

In the case of the button, we would need to change this line mainly:

$r .= "\t\t<input type='submit' value='" . esc_attr( $form->get_attribute( 'submit_button_text' ) ) . "' class='pushbutton-wide'/>\n";

I want to submit a PR, but I'm posting this issue here to collect opinions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions