Jump to content
Sign in to follow this  
bharai

Forms questions

Recommended Posts

Ok so I have to write the code for these two points and I was hoping someone could tell me if I'm on the right track. Not looking for anyone to do it for me because I want to learn it, so here it goes:5. After the subPlans field set, insert a label containing the text “ Name”. Associate the label with the cName field and put it in the class floatLabel. 6. After the label, insert an input box for the cName field. Place the input box in the floatCtrl field (This is the part confusing me)and set the size of the input box to 50 charactersso is the below code right do they mean to set the class="floatCtrl"? <form id="subform"> <fieldset id="subplans"> <label for="plan1">6 mo./$24</label> <input type="radio" name="" id="plan1" value="" /> <label for="plan2">12 mo./$45</label> <input type="radio" name="" id="plan2" value="" /> <label for="plan3">18 mo./$64</label> <input type="radio" name="" id="plan3" value="" /> <label for="plan4">24 mo./$80 (Best Value)</label> <input type="radio" name="" id="plan4" value="" /> </fieldset> <label for="cName" class="floatLabel">Name</label> <input type="text" name="floatctrl" id="cname" maxlength="50" /> </form> Thanks for any help

Share this post


Link to post
Share on other sites

You're going to have to see what they mean by "field" because I don't really know. Usually a field refers to one of the form elements.

Share this post


Link to post
Share on other sites

I dint exactly figured out what you want but you could try the following code:It sets the layout correctly:<form id="subform"> <label for="cName" class="floatLabel">Name</label> <input type="text" name="floatctrl" id="cname" maxlength="50" /> <fieldset id="subplans"> <input type="radio" name="" id="plan1" value="" /> <label for="plan1">6 mo./$24</label> <input type="radio" name="" id="plan2" value="" /> <label for="plan2">12 mo./$45</label> <input type="radio" name="" id="plan3" value="" /> <label for="plan3">18 mo./$64</label> <input type="radio" name="" id="plan4" value="" /> <label for="plan4">24 mo./$80 (Best Value)</label> </fieldset> </form>Learn more about forms @http://www.w3schools.com/html/html_forms.asp and HTML Input Forms.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...