Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Comment_Form - invalid XHTML 1.0 Strict
<input type="hidden" name="parentid" value="184" /><input type="hidden" name="backpage" value="/journal/403-textile-fix" />
<br />
TXP automatically adds this at the end of comment_form now, which invalidates the code as XHTML 1.0 Strict, because they lack wrapping tags.
For now, I’ve added <p>
to the end of my comment_form, and hacked comment.php on line 180, changing it to </p></form>
.
It seems like there should be a better way to do this. Any advice? I’m no guru, so that’s why I’m asking. The TXP dev team has done a great job.
Are we all figments of God’s imagination?
Offline
Re: Comment_Form - invalid XHTML 1.0 Strict
Hi Nathan,
I accidently broke this, because I wasn’t aware that strict requires all elements in forms be wrapped in block-tags. Previously the individual hidden fields were wrapped in p’s, which some people reported as being unnecessary (apparently equally unaware of strict-rules as I).
Anyway, the options we now have is to either go back to wrapping each hidden field inside a p, or to wrape everything in the comment-form inside one large div. Is there any arguments for and against each of those options?
Offline
Re: Comment_Form - invalid XHTML 1.0 Strict
I would just wrap them in P’s again, but possibly add a class to the P of txp_form_hidden
, just in case people are worried about them. That way, the validation police will be happy, and those that don’t like the block element can style it away.
Are we all figments of God’s imagination?
Offline
Re: Comment_Form - invalid XHTML 1.0 Strict
> Sencer wrote:
I accidently broke this, because I wasn’t aware that strict requires all elements in forms be wrapped in block-tags. Previously the individual hidden fields were wrapped in p’s, which some people reported as being unnecessary (apparently equally unaware of strict-rules as I).
Upon my request, Pedro sort of fixed this in rev 1205 by inserting a div that wraps around the whole content of the form. It is a solution, although not perfect. I’d rather see just those hidden input
fields wrapped in a div
(div rather than a p
, because a div by default doesn’t take up space in some crappy browsers (cough IE).
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: Comment_Form - invalid XHTML 1.0 Strict
“Just” is misspelled on line 135, not that it matters.
I agree too, that a div
is probably better, since it’s value-less by default. Good call.
Last edited by Nathan Smith (2006-01-02 06:10:28)
Are we all figments of God’s imagination?
Offline
Re: Comment_Form - invalid XHTML 1.0 Strict
I’m happy with that too.
Offline
Re: Comment_Form - invalid XHTML 1.0 Strict
Would it be possible to create TXP tags, like <code><txp:comments_back /></code> etc, and have them visible in the comments_form form? I wrap my comment forms in a fieldset, not a div, so it’d be more convenient.
It’d be great if it went like this:
<code><txp:comment_preview /><txp:comment_submit /><txp:comments_parentid /><txp:comments_back /></code>
EDIT: Nevermind—it was easy enough to edit the php to add my fieldset.
Last edited by deldindesign (2006-03-08 07:19:13)
Offline
Re: Comment_Form - invalid XHTML 1.0 Strict
Why p
or div
when you have fieldset
?
Offline
Re: Comment_Form - invalid XHTML 1.0 Strict
A div/p is usually invisible, so few people will see a surprise when we add it. A Fieldset on the other hand, is usually rendered by the browser. And given that we used to have p, I think that’s what we’ll do for the next minor releas.
But for the next major release, I agree a fieldset seems to be the better option.
Offline
Re: Comment_Form - invalid XHTML 1.0 Strict
I have predicted this kind of an answer, and I understand that you need to make this tool most usefull to people who are not web profesionals or who aren’t fammiliar with XHTML and CSS.
But then again, they proably use templates for their designs made by other people who do know XHTML/CSS and they will be able to style away the fieldsets.
How about adding a couple of lines to the default stylesheet for those fieldsets?
<code>
fieldset{
padding:0; margin:0;
border:none;
}
</code>
Offline
Re: Comment_Form - invalid XHTML 1.0 Strict
How about adding a couple of lines to the default stylesheet for those fieldsets?
Again, that might break existing designs.
We try to not automatically fiddle with the users forms/styles if it can be helped in maintenance releases. The benefit doesn’t justify the cost (for the majority of people).
Offline