Re: W3C Validator and Post Arrays
| From: | Paul M Foster | Date: | Thu, 02 Apr 2009 21:00:06 +0000 |
| Subject: | Re: W3C Validator and Post Arrays | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-290985@lists.php.net to get a copy of this message | ||
On Thu, Apr 02, 2009 at 02:25:55PM -0400, tedd wrote:
> At 4:03 AM -0700 4/2/09, Michael A. Peters wrote:
>> Shaun Thornburgh wrote:
>>> Hi,
>>>
>>> We are getting errors when trying to vaildate our HTML due to the [
>>> character when using Post Arrays:
>>>
>>> Line 173, Column 65:
>>> character "[" is not allowed in the value of attribute "id"
>>>
>>> e="filters[calling_url]" id="filters[calling_url]"
>>> value="categories-bulk-ear
>>>
>>> Does anyone know of a way around this?
>>>
>>> Thanks
>>
>> Don't use [] in an ID - it doesn't belong there.
>> If you are not using the ID for a hook, just drop it - the ID doesn't need
>> to be there.
>>
>> The name attribute is where you want the [] to post an array, ID does not
>> get sent in a post.
>
>
> Correction -- name is Ok and where you should put the [].
>
> The demo is here:
>
> http://www.webbytedd.com/bbb/check-box-form/
>
> It works, shows why and how you can use [] and it validates.
>
> Cheers,
>
> tedd
I vote we scrap this list. Anyone with a question, just go to Tedd's
website. There's got to be an example on there somewhere. ;-}
Paul
--
Paul M. Foster