Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-10-02 20:40:55

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

validation / zem contact

Hey yall,
Anyone know how to get this to validat xhtml 1.0 trans.

See the site page here

Here is the article with the zem bits

—————————————-

We would love to hear from you. If you have any questions for us, want to find out where the closest homegroup is just hollar. Throw us an email!
<code>
<txp:zem_contact mailto=“dave@liberti.org”>
<txp:zem_contact_select label=“Deliver To” list=”,Dave Braud – Admin/Worship,Geoff Bradford – Lead Pastor,Steve Huber – Pastor, Steve Lutz – Pastor,Nick – Intern,Christine Edwin – Finances” /><br/>
<txp:zem_contact_text label=“Your Name” />
<txp:zem_contact_email label=“Your Email” /><br />
<txp:zem_contact_textarea label=“Message” /><br />
<txp:zem_contact_submit label=“Send” />
</txp:zem_contact>
</code>

Also this article: on the services page:

<code>
<b>ART MUSEUM SERVICE</b><div class=“right”><a href=“http://www.mapquest.com/maps/map.adp?city=Philadelphia&state=PA&address=860+N.%2024th+st&zip=19130&country=us&zoom=8”/><img src=”../images/globe.jpg” alt=“globe”/></a></div>

Philadelphia Mennonite High School,
860 N. 24th (24th and Poplar)
Philadelphia, PA 19130
10:30 am

Septa Information:
You can take bus routes 7, 32, and 48 to get to our Art Museum worship site.

<b>NORTHERN LIBERTIES SERVICE</b><div class=“right”><a href=“http://www.mapquest.com/maps/map.adp?city=Philadelphia&state=PA&address=250+Brown+st&zip=19123&country=us&zoom=8”/><img src=”../images/globe.jpg” alt=“globe”/></a></div>
Holy Trinity Romanian Orthodox Church
Brown & American Streets
Philadelphia, PA 19123
4:00 pm

Septa Information:
You can take bus routes 47, 43, or 57 or the Market-Frankford El to the Spring Garden station to get to our Northern Liberties worship site. Please visit <a href=“http://www.septa.com”>www.septa.com</a> for more information.
</code>

Last edited by ma_smith (2005-10-02 21:31:05)


Offline

#2 2005-10-03 09:14:09

davidm
Member
From: Paris, France
Registered: 2004-04-27
Posts: 719

Re: validation / zem contact

I’d advise to use the w3c validator, analyse whatever error come out and decompose the output code to trace back the source of misvalidation.

It seems in your case this <code>name=“DeliverTo”><option selected=1></option></code> is the reason why you have two errors…

The way to go about this is dig into the plugin and try understand what caused it, then come back and report with solution…
If I have a couple of minutes, I’ll look into it….

Last edited by davidm (2005-10-03 09:16:50)


.: Retired :.

Offline

#3 2005-10-03 14:10:37

maharis
New Member
From: KL Malaysia
Registered: 2005-08-02
Posts: 9
Website

Re: validation / zem contact

obviously <code>&lt;option selected=1&gt;&lt;/option&gt;</code> is not valid, it’s an empty option. im not using zem_contact on my sites, but i guess by adding something like <code>list=“please select: ,Dave… ,… “</code> should do the trick.

Offline

#4 2005-10-03 19:26:16

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: validation / zem contact

davidm,
Thanks. I am well aware of w3c, I am just unable to decipher all of the warnings, and had hoped someone could point out some blaring errors in the way I have things layed out in order to give me a head start. For instance, I believe I have all of my tags closed, but it still has validation errors that “could” include unclosed tags. I couldn’t quite figure this out.

I did change the <div> which was inside the <p> tag. I made the <a> into class “right” instead of making the whole thing div class=“right”. Now the services page validates.

I have taught myself all of this, so I don’t have a real comprehensive knowledge. Hence, why the w3c validation errors can sometimes be confusing.

THanks,

Matthew

and maharis,
I have tried that and it does not work. Its got to be something symantic, but I can’t figure it out.

Last edited by ma_smith (2005-10-03 19:54:48)


Offline

#5 2005-10-03 22:21:41

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: validation / zem contact

Matthew,

As far as I know selected=1 is not possible, you can only have selected="selected". I think I know what you have to change in the plugin code (just not exactly how); find this line (in function zem_contact_select):

$out .= '<option selected=1>'.$list[$i]."</option>\n";<br />
and change it into:<br />
$out .= '<option selected="selected">'.$list[$i]."</option>\n"; (Note: I am not sure about the quotes, always having trouble with those… so if anyone knows better, please speak up!)<br />
The ‘for’ attribute has to match the id of the form element, so what’s missing is id=“DeliverTo” in the select tag. That line is about six lines down in the code:<br />
'<select name="'.$name.'">'.$out.'</select>'; should be (something like) '<select id="'.$name.'" name="'.$name.'">'.$out.'</select>';<br />
Please be careful making those changes, I’d rather have a real coder confirm (or condemn if necessary) my guesses…

Offline

Board footer

Powered by FluxBB