WordPress.org

Forums

Contact Form 7
adding markup where I don't want it to...? (4 posts)

  1. joshuairl
    Member
    Posted 1 year ago #

    If I customize the way my form looks in the left box, it's still trying to put <p></p> tags in there.

    I think I understand why this is, because it's ran through the wordpress post filter but why couldn't there be an option to send plain text for the formatting versus having it run through the filters?

    https://wordpress.org/plugins/contact-form-7/

  2. joshuairl
    Member
    Posted 1 year ago #

    After each label there is a closing </p> for some reason..?

    FYI, here is the output in view source:

    <div class="form-group">
      <label class="col-md-4 control-label" for="selectbasic">Reason for Inquiry</label></p>
    <div class="col-md-6">
        <span class="wpcf7-form-control-wrap contact_reason"><select name="contact_reason" class="wpcf7-form-control wpcf7-select wpcf7-validates-as-required form-control" id="contact_reason" aria-required="true" aria-invalid="false"></select></span>
      </div>
    </div>
    <div class="form-group">
      <label class="col-md-4 control-label" for="textinput">Your Name</label>  </p>
    <div class="col-md-6"> <span class="wpcf7-form-control-wrap contact_name"><input type="text" name="contact_name" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required form-control" aria-required="true" aria-invalid="false" /></span></div>
    </div>
    <div class="form-group">
      <label class="col-md-4 control-label" for="textinput">Email Address</label>  </p>
    <div class="col-md-6"><span class="wpcf7-form-control-wrap contact_email"><input type="email" name="contact_email" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-email wpcf7-validates-as-required wpcf7-validates-as-email form-control" id="contact_email" aria-required="true" aria-invalid="false" /></span></div>
    </div>
    <div class="form-group">
      <label class="col-md-4 control-label" for="textinput">Phone</label>  </p>
    <div class="col-md-6">
    <span class="wpcf7-form-control-wrap contact_phone"><input type="tel" name="contact_phone" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-tel wpcf7-validates-as-tel form-control" id="contact_phone" aria-invalid="false" /></span>
      </div>
    </div>
    <div class="form-group">
      <label class="col-md-4 control-label" for="Details">Details</label></p>
    <div class="col-md-4">
        <span class="wpcf7-form-control-wrap contact_details"><textarea name="contact_details" cols="40" rows="10" class="wpcf7-form-control wpcf7-textarea wpcf7-validates-as-required form-control" id="contact_details" aria-required="true" aria-invalid="false"></textarea></span>
      </div>
    </div>
    <div class="form-group">
      <label class="col-md-4 control-label" for="button1id"></label></p>
    <div class="col-md-8">
     <input type="submit" value="Send Inquiry" class="wpcf7-form-control wpcf7-submit btn btn-primary" id="contact_btn" />
      </div>
    </div>
    </fieldset>
  3. Tdude
    Member
    Posted 1 year ago #

    Hi!

    Try removing the <p> -tags by adding this on a separate line in your wp-config.php (in your root catalog where you installed WordPress):

    define( 'WPCF7_AUTOP', false );

    You can remove the WPCF7 JS and CSS by writing that instead of AUTOP (autoparagraph).

    Good luck,
    T

  4. buzztone
    Member
    Posted 1 year ago #

    RE: why couldn't there be an option to send plain text for the formatting versus having it run through the filters?

    There is - see http://contactform7.com/controlling-behavior-by-setting-constants/

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Contact Form 7
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.