WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Form does not inherit theme's style

[Resolved] Form does not inherit theme's style

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Takayuki Miyoshi

    @takayukister

    In the page_id=239 page’s form, each input field has a class attribute value “form-input” and your theme’s stylesheet applies nice looking style to the “form-input” class. While the page_id=380 page doesn’t have such class values.

    To fix this, set “form-input” class option to the Contact Form 7’s field tags like this:

    [text* your-name class:form-input]

    Thank you very much for your fast reply! Although it makes total sense, it did not change the class of page_id=380. The code I get, even after making the suggested changes, is:

    <div class="wpcf7" id="wpcf7-f381-p380-o1">
    <form action="/?page_id=380#wpcf7-f381-p380-o1" method="post" class="wpcf7-form">
    <div style="display: none;">
    <input type="hidden" name="_wpcf7" value="381" />
    <input type="hidden" name="_wpcf7_version" value="3.3.3" />
    <input type="hidden" name="_wpcf7_unit_tag" value="wpcf7-f381-p380-o1" />
    <input type="hidden" name="_wpnonce" value="107e5c366e" />
    </div>
    <p><strong> Nome </strong>(obrigatório)
        <span class="wpcf7-form-control-wrap your-name"><input type="text" name="your-name" value="" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required" size="40" /></span> </p>
    <p><strong>Email </strong>(obrigatório)
        <span class="wpcf7-form-control-wrap your-email"><input type="text" name="your-email" value="" class="wpcf7-form-control wpcf7-text wpcf7-email wpcf7-validates-as-required wpcf7-validates-as-email" size="40" /></span> </p>
    <p><strong>Assunto </strong>(opcional)
        <span class="wpcf7-form-control-wrap your-subject"><input type="text" name="your-subject" value="" class="wpcf7-form-control wpcf7-text" size="40" /></span> </p>
    <p><strong>Mensagem </strong>(obrigatório)
        <span class="wpcf7-form-control-wrap your-message"><textarea name="your-message" class="wpcf7-form-control  wpcf7-textarea" cols="40" rows="10"></textarea></span> </p>
    <p><input type="submit" value="Enviar" class="wpcf7-form-control  wpcf7-submit" /></p>
    <div class="wpcf7-response-output wpcf7-display-none"></div>
    </form>
    </div>

    [Please post code or markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    Could I change this class calues directly in the plugin code? Would it be advisable and allowed? If so, which file should I look for?

    Once again, thank you.

    Plugin Author Takayuki Miyoshi

    @takayukister

    What tag exactly do you use? It shouldn’t be such output.

    Could I change this class calues directly in the plugin code? Would it be advisable and allowed? If so, which file should I look for?

    No. Do not edit plugin’s code. It is always bad idea.

    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] Form does not inherit theme's style’ is closed to new replies.