Search and XHTML Vaildation failure because of form 'name' attribute

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
Russ
Power Poster
Power Poster
Posts: 813
Joined: Fri Nov 25, 2005 5:02 pm
Location: North West England

Search and XHTML Vaildation failure because of form 'name' attribute

Post by Russ »

Using the internal search in 1.02, I'm having problems getting it to validate with XHTML Strict because of the name stuff. Now normally I'd just remove it from the form, but this seems Smarty generated? Any ideas how to remove it?

"This page is not Valid XHTML 1.0 Strict!
Below are the results of checking this document for XML well-formedness and validity.

  1. Error Line 80 column 36: there is no attribute "name".

      <form id="cntnt01moduleform-1" name="cntnt01moduleform-1" method="get" action...."

Russ
Piratos

Re: Search and XHTML Vaildation failure because of form 'name' attribute

Post by Piratos »

This is an error from modform.inc.php

Code: Select all

$text = '<form id="'.$id.'moduleform-'.$idsuffix.'" name="'.$id.'moduleform-'.$idsuffix.'" method="'.$method.'" action="'.$goto.'"';//moduleinterface.php
$id is in use for id and name.
Russ
Power Poster
Power Poster
Posts: 813
Joined: Fri Nov 25, 2005 5:02 pm
Location: North West England

Re: Search and XHTML Vaildation failure because of form 'name' attribute

Post by Russ »

Thanks very much Piratos.
By removing the
name="'.$id.'moduleform-'.$idsuffix.'"
from the line mentioned I got it to validate. I hope this is not going to affect anything else! ;-)

I also notice that the 'name' attribute appears quite a lot in this code. Not sure why?

Russ
Kagee

Re: Search and XHTML Vaildation failure because of form 'name' attribute

Post by Kagee »

I belive that's because the name attribute is allowed in XHTML 1.0 Traditional.
Post Reply

Return to “Developers Discussion”