Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-01-01 02:03:03

Nathan Smith
Member
Registered: 2005-01-14
Posts: 66
Website

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

#2 2006-01-01 14:31:11

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

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

#3 2006-01-01 21:27:02

Nathan Smith
Member
Registered: 2005-01-14
Posts: 66
Website

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

#4 2006-01-02 05:14:37

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,058
Website

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

#5 2006-01-02 06:00:52

Nathan Smith
Member
Registered: 2005-01-14
Posts: 66
Website

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

#6 2006-01-03 18:54:31

NikLP
Member
From: Nottingham
Registered: 2005-02-01
Posts: 43
Website

Re: Comment_Form - invalid XHTML 1.0 Strict

I’m happy with that too.

Offline

#7 2006-02-15 06:57:44

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

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

#8 2006-02-16 18:40:05

Dragan
Member
From: Novi Sad, Serbia
Registered: 2005-10-26
Posts: 100
Website

Re: Comment_Form - invalid XHTML 1.0 Strict

Why p or div when you have fieldset?

Offline

#9 2006-03-10 23:40:30

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

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

#10 2006-03-11 09:35:02

Dragan
Member
From: Novi Sad, Serbia
Registered: 2005-10-26
Posts: 100
Website

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

#11 2006-03-11 10:51:42

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

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

Board footer

Powered by FluxBB