[wp-hackers] Autop and Pages
Alex King
alex at alexking.org
Mon Jan 24 19:44:29 GMT 2005
*sigh* - I updated to the latest nightly and I can now set a custom
field on a page. Nevermind...
--Alex
http://www.alexking.org/
On Jan 24, 2005, at 12:30 PM, Alex King wrote:
> I've run into an ugly situation with Pages and AutoP in 1.5 (I've got
> a nightly from a week or two back). I'm setting up a contact form in a
> Page, and the AutoP is mangling the code pretty badly.
>
> My first reaction was to set a custom field to turn off formatting for
> the Page, but custom fields don't seem to be available for Pages.
>
> Here is what I put in initially:
>
> <form action="/email.php" method="post" onsubmit="return
> validateEmail();">
> <fieldset class="email_form">
> <p>
> <label for="from_name">Your Name:</label>
> <input type="text" name="from_name" id="from_name" value="" />
> </p>
> <p>
> <label for="from_address">Your E-mail Address:</label>
> <input type="text" name="from_address" id="from_address" value="" />
> </p>
>
> <p>
> <label for="subject">Regarding:</label>
> <select name="subject" id="subject">
> <option selected="selected">--</option>
> <option>Other...</option>
> </select>
> </p>
> <p>
>
> <label for="message_body">Message:</label>
> <textarea name="message_body" id="message_body" rows="10"
> cols="45"></textarea>
> </p>
> <p>
> <input type="submit" name="submit" value="Send E-mail" class="send"
> />
> </p>
> </fieldset>
> </form>
>
> And it became a colossal mess - *really* bad. So I stripped out as
> much formatting as I could, bringing it down to this:
>
> <form action="/email.php" method="post" onsubmit="return
> validateEmail();">
> <fieldset><legend>Contact Form</legend><input type="hidden"
> name="config" value="contact" />
>
> <label for="from_name">Your Name:</label><input type="text"
> name="from_name" id="from_name" value="" />
>
> <label for="from_address">Your E-mail Address:</label><input
> type="text" name="from_address" id="from_address" value="" />
>
> <label for="subject">Regarding:</label><select name="subject"
> id="subject"><option
> selected="selected">--</option>option>Other...</option></select>
>
> <label for="message_body">Message:</label><textarea
> name="message_body" id="message_body" rows="10" cols="45"></textarea>
>
> <input type="submit" name="submit" value="Send E-mail" class="send" />
>
> </fieldset>
> </form>
>
> But I'm still having a problem with a <br /> tag being entered between
> the <label /> and the <select /> for the subject field.
>
> <p> <label for="subject">Regarding:</label><br />
> <select name="subject" id="subject"><option
> selected="selected">–</option><option>General
> Comment</option><option>Web Development
> Consulting</option><option>Blog Development
> Consulting</option><option>User Interface
> Consulting</option><option>Other…</option></select>
>
> And the <label /> and the >textarea /> for the message field:
>
> <p> <label for="message_body">Message:</label><br />
> <textarea name="message_body" id="message_body" rows="10"
> cols="45"></textarea></p>
>
> And an extra <p> and <br /> tag being added at the end:
>
> <p> </fieldset><br />
> </form>
>
> Has anyone else run into problems like this? Solutions?
>
> Why aren't custom fields available for Pages?
>
> --Alex
>
> http://www.alexking.org/
>
> _______________________________________________
> hackers mailing list
> hackers at wordpress.org
> http://wordpress.org/mailman/listinfo/hackers
More information about the hackers
mailing list