Jeff...

I don't know how much "a fair amount of work downstream" amounts to, nor what timing issues are involved, but having two fields with the same name, in the same form, seems to me not a good idea (Service Mark pending).

From w3c (Forms in HTML documents):

name = cdata [CI]
This attribute names the element so that it may be referred to from style sheets or scripts. Note. This attribute has been included for backwards compatibility. Applications should use the id attribute to identify elements.
Emphasis in original

Further, albeit specifically asserted only in reference to anchors, w3c (global structure) notes that id and name "share the same namespace."

I have seen (sorry, no cite handy) discussions that suggest w3c will go beyond merely deprecating name in the context you're using it. How soon? Who knows, and yes, it'll be some time before browsers catch up, if it actually happens, but you could find yourself under the gun, if you hold off on fixing whatever's needed until there's a (practical) deadline stareing you in the face.

In fact, I suspect (without testing, since you don't specify the "work downstream") that either
  1. You could change the <select id="birth_day" name="birthdate"> to <c><select id="birth_day" name="birth_day"> without having to make any further changes...
  2. or, you may need only to make minor changes in the script parsing the form as submitted.

If the form works, as is, in a browser, the former seems likely, because otherwise, I would not expect the form to distinguish between the duplicate names.


In reply to Re: Duplicate field names and Test::WWW::Mechanize by ww
in thread Duplicate field names and Test::WWW::Mechanize by Mur

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.