<div class="form-group"> <label for="gender" class="col-sm-2 control-label">Gender </label> <div class="col-sm-6<code>
Thank you .
The actual code
<div class="form-group"> <label for="gender" class="col-sm-2 control-label">Gender </label> <div class="col-sm-6"> <label class="radio-inline"> <input type="radio" name="genderRadio" value="optional" /> Male </label> <label class="radio-inline"> <input type="radio" name="genderRadio" value="optiona2" /> Female </label> </div> </div>
Reposted the actual code , i donno what happened there .
Well you gave them the input
Well you gave them the input type radio, meaning it will create a radio button for this question.
If you are asking a question where there are three different answers possible, and all those answers have an input type of radio then you can only choose one of those three questions.
If you want your visitors to be able to pick multiple answers you might want to use the input type checkbox, instead of radio.
But for now, just like the command
<body> (they are known codes being translated by different kind of browsers so they know how to show a page to a visitor) that also happens with the form commands "submit", "checkbox", "radio" and more commands.
Hope this helps you a bit.
When a form is submitted, the 'name' attribute is the key of the key/value pair sent to the server. It is required on all form controls excepting 'submit' and 'reset'.
The name attribute defines the members of a radio control set, thus:
<input type="radio" name="gender"> <input type="radio" name="gender">
The label element is 'attached' to its form control by the 'for' and 'id' attributes, for example:
<label for="genderm"> <input type="radio" name="gender" id="genderm"> male</label> <label for="genderf"> <input type="radio" name="gender" id="genderf"> female</label>
Study §17.3 The FORM element. Do it again and again. Forms seem to cause confusion, and the only way to clarify things is to learn the rules. It is not to adopt some sort of 'helper' idiocy.
Please, please, please get rid of Bootstrap and any similar 'frameworks'. You are only learning to code stupidly wrong. It is simply easier to learn the correct structure, semantics and syntax.
Why the rant? Look at this:
<div class="form-group">. That is stupid, and yells out, "the guy who coded me is gormless". The semantic and structurally correct element is <fieldset>.
And now back to our regularly scheduled programming,
Thank you gary .
Hey gary ,
I really appreciate your advice , thing is i am a grad out of collage in a job , in a very small company and my boss is like "YOU NEED TO RUN BEFORE U LEARN TO WALK " , not that he's wrong , but the way i like to learn is the chinesses way , I.E. "FOR A STRUCTURE TO STAND THE FOUNDATION MUST BE GOOD" . but in a quest to complete my task i need to use bootstrap , that does not mean i love it or am not focussed on CSS . infact , everytime i find a new CSS element , i go research on it and find out how it works . I use bootstrap jst as a tool, to complete my work, But my focus is on Core css , i world love to see the day when i build a website from ground up (that day would be far away) and I'd surely review it with u too :)
and yeah i have heard that property call feildset too , used it a bit here and there . I am learning gary pls don't be so harsh on me .
And Thank you though , i know u mean good when u say , Frameworks are not good for "beginners" . Oh ! and i envy the Five stars you have , i have only one yet is there anyway i can change that using CSS gary ? lol Joke.
Kind regards .