SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Forms Structure

  1. #1
    SitePoint Member
    Join Date
    May 2010
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Forms Structure

    Hello All from the caribbean,

    New to the forums here at sitepoint. I'm having an issue with a form I have coded that is being sent out to the visitors and site owners email using universal email 4 from web assist. I'm no guru when it comes to web development or design having started at the beginning of 2009 with this service.

    The problem I'm having is that the form doesn't show up with the appropriate labels when a text field is filled in the form. Actually, it doesn't show any label at all. Also, nothing shows up for the checked boxes on the form. I have uploaded images to show you what I'm talking about.

    The code I used for the input fields is as follows:

    Code:
    <tr>
    <td><label for="PPqtySencillo, CAqtyDocena, CAqtyMedDocena">Pechuga de Pollo ></label></td>
    <td class="inputCell"><input id="PPqtySencillo" name="PPqtySencillo" type="text" size="1" maxlength="2" /></td>
    <td class="inputCell"><input id="PPqtyDocena" name="PPqtyDocena" type="text" size="1" maxlength="2" /></td>
    <td class="inputCell"><input id="PPqtyMedDocena" name="PPqtyMedDocena" type="checkbox" value="" checked=""/></td>
    </tr>
    This is only a section of the table. I'm wondering if several input names/id in the for option of the label is valid or it should be only a single option.

    jc


    Revision:

    Ok...so I did what I should have done from the beginning and that is validate my code. It tells me I'm not supposed to have more than one id/name in the for option of the label. I fixed that but the error is still occurring. Guess I should go to the extension site and see if it's their ode that's causing the problem.

    Thanks anyway for looking in.
    Attached Images Attached Images
    Last edited by jc1ell; May 12, 2010 at 11:50. Reason: Did the reasonable thing and found out the answer

  2. #2
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can't associate a <label> with more than one form control. The value of the for attribute cannot be a comma-separated list. But in this case it doesn't look like it should be a <label> at all, but rather a <th>.
    Birnam wood is come to Dunsinane

  3. #3
    SitePoint Member
    Join Date
    May 2010
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You're absolutely right on both points. The first I had found via validation and fixed it. The second,well, like I said; I'm no guru at this and am still learning. I guess I wanted to keep the form coding structure.

    Thanks for the reply. I found the solution on another thread to all the issues. I was missing the value"" for the checkbox input tag and was made aware that the label information is not passed automatically to the email, I have to write it manually and pass the dynamic data next to that.

    Cheers
    jc


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •