WordPress Inserting Line Breaks In Front of Form Elements
Filed Under Geek, Wordpress on 2009-02-26, 13:37
So I’m working on a form for users to submit data on a WordPress-based site. I want it to look like this:

What I’m getting is this:

Those are screenshots, so here’s a “live” example:
Name:
Email:
Phone #:
Taking a look at the preview page using Firebug, I noticed that it was inserting <br /> in front of each input field. It did this with a select drop-down menu too. What gives? Anyone ever run into this?
Comments
View Comments to “WordPress Inserting Line Breaks In Front of Form Elements”
Leave a Reply
I dont know how this works in wordpress but in HTML you should be using <label> elements instead of plain text descriptions.
I'm using label tags, and wordpress STILL adds a br before the input button!
The formatting of the button depends on label's background and it's broken.
How do I prevent that other than manually editing the database?
I hope you found a solution for this by now, but on the WP forums there was a nice little solution: http://wordpress.org/support/topic/240350
Basically using styles to ignore any br within the form section, nice but a bit hacky :)
I hope you found a solution for this by now, but on the WP forums there was a nice little solution: http://wordpress.org/support/topic/240350
Basically using styles to ignore any
's within the form section, nice but a bit hacky :)