I just updated to the newest version of Contact Form 7 and now all my input fields have a <br /> tag inserted before them.
Does any one else have this problem? I don't want the input field to be on a new line.
I just updated to the newest version of Contact Form 7 and now all my input fields have a <br /> tag inserted before them.
Does any one else have this problem? I don't want the input field to be on a new line.
you can just manually remove them or not?
No, they don't show up in the editor, only the source code, as if they're a part of the shortcode.
hmm i have cf7 too, latest version, ill go check, brb
<p>E-mail:
info@website.com</p>
this is how a default inserted field looks at my website.
(ps. i didnt mean the editor, i meant the contact form 7 admin page)
pasted wrong code: here's the correct one:
<p>Email *<br />
[email* email] </p>Right, on the contact form 7 admin page the <br /> does not appear. Only in the source code after the form is published.
Does the line break in your example appear in the contact form 7 admin?
The short code for my email field looks like this [email* your-email] but the code it outputs looks like this:
<span class="wpcf7-form-control-wrap your-email"><br />
<input type="text" name="your-email" value="" class="wpcf7-validates-as-email wpcf7-validates-as-required" size="40" /></span>yes, the line break appears in the admin page of cf7. when i remove it, i have no break.
Very strange...
my output is
<span class="wpcf7-form-control-wrap your-email"><input type="text" name="your-email" value="" class="wpcf7-validates-as-email wpcf7-validates-as-required" size="40" /></span>
what version you are using? I just found out im not at the very latest version... thought i was... maybe thats the differance
I'm using version 2.1.1
See this topic:
Adding define( 'WPCF7_AUTOP', false ); to my config file didn't solve the problem. I still have line breaks inserted before each input field.
Can I see the page?
Sorry for the delay. Page is here.
See if switching to the default theme would resolve this issue.
I have the same problem, this happened after the upgrade to the new version of Contact Form. Now breaks are auto-inserted between the word and field. I mean:
Before (Good):
Name:
[name field here]
Now (ugly!!!):
Name:
[name field here]
Any solution?
I provisionally solved it in a rough way, if you want your form to look like before, just put the fields this way:
Name: [text* your-name]
This will show up:
Name:
[name field]
Yeah, but what if you don't want a line break at all...
That's the f* problem.
Can't recall if there was an update, but I'm not having this problem any more.
I have the same problem, e.g. here: http://zuerichtennis.vereinsportal.org/turniere-events/kerenzerberg
I have no idea how to get rid of the br. Anyone else?
I'm having the same problem. I'm not using the same Contact form plugin, just inserted a search form and can't put the text on the same line as the input tag. Any solutions?
This is really a disappointment from such a great, reliable plugin.
Why, why, why would they do this? Ok...I understand...they are considering the lowest common denominator—general purpose users-but still at least make it an option (Check here to auto format your form).
I hope the developers fix this. This is going to compromise a lot of existing sites, right??????
Here is my workaround:
.wpcf7-form-control-wrap br {display: none!important;}
Reason:
1) Editing the core plugin file will just result in it being overwritten the next time you run the update.
2) The wp-config.php edit didn't work either, which seems like another issue in and of itself.
3) I can insert my own <br class="myBreak" /> and make those appear where I want them.
May be time to look for a better plugin. Suggestions?
C'est la vie.
*ian
I posted about this a few weeks ago.
The solution I came up with was a serious hack, but there was no other way around it short of editing the plugin's core code. Just stick this somewhere in your theme's functions.php and it should work:
add_filter("wpcf7_mail_tag_replaced", "suppress_wpcf7_filter");
function suppress_wpcf7_filter($value, $sub = ""){
$out = !empty($sub) ? $sub : $value;
$out = strip_tags($out);
$out = wptexturize($out);
return $out;
}Also note that this is NOT the same issue as not having the "WPCF7_AUTOP" constant defined to FALSE; this issue's a completely different one altogether. The most recent build of the plugin "features" mandatory autop formatting of the submitted post; which means all your field references are going to be broken up line by line, whether you like it or not.
So something like this:
Name: [text* first-name] [text* surname]
Is going to come out looking like this:
Name:
Henry
Anderson
Total pain in the ass.
This topic has been closed to new replies.