How to get the HTML and CSS of the form - html

I've seen a page here:
https://thrivecompany.le-vel.com/Login?ReturnUrl=%2fAccount
Now I want to copy the exact HTML + CSS of it entirely of the registration part.
How do I do that? Can you also pull it up for me and paste it here if it's possible?
thanks!
Is there a way guys you can pull it out here or paste on JSFIDDLE?

Control + Shift + J on google chrome will open up the developer window. Go to the Element tab and you will be able to see the entire HTML+CSS. Try by your self so that you will also be able to learn, debug and play with CSS inline.

Basic Implementation (without To much styling)
https://jsfiddle.net/ashwinshenoy/vmubcaq6/1/\
<div class="content-block">
<h3><span class="icon16 profile"></span>Create New Customer Account</h3>
<form action="/Login/CreateAccount" id="CreateAccountForm" method="post">
<input name="__RequestVerificationToken" type="hidden" value="86bIeUrxTBQdZS06SchMTRYnReJ5oRfLYtSgGdAcw637GrhUoaAUdwv6AE1NCQyEe3pZim2SjMvoDkEmKleviECcJT3HACv9GzOvZtH_GVg1">
<div class="content-block">
<div class="FormRow">
<strong>Please confirm your referring Promoter:</strong>
</div>
<div class="FormRow">
<label class="auto">
<input checked="checked" data-val="true" data-val-booleanrequired="You Must Confirm Your Retailer" data-val-required="You Must Confirm Your Retailer" id="ConfirmRetailer" name="ConfirmRetailer" type="radio" value="True">
<span class="field-validation-valid" data-valmsg-for="ConfirmRetailer" data-valmsg-replace="true"></span> I was referred by <strong>Nicole Anderson (thrivecompany)</strong>
</label>
</div>
<div class="FormRow">
<label class="auto">
<input id="ConfirmRetailer" name="ConfirmRetailer" type="radio" value="False"> I was referred by someone else
</label>
</div>
<div id="CreateAccount_ChangeReferralForm" class="center" style="display: none;">
<div class="FormRow">
<strong>http://
<input data-val="true" data-val-regex="Invalid Characters" data-val-regex-pattern="(?!^\d+$)^[a-zA-Z0-9_]{3,15}$" data-val-remote="That Username does not exist" data-val-remote-additionalfields="*.ChangeUsername" data-val-remote-url="/JSON/CheckUsernameExists" id="ChangeUsername" name="ChangeUsername" type="text" value="">
<span class="field-validation-valid" data-valmsg-for="ChangeUsername" data-valmsg-replace="true"></span>
.le-vel.com</strong>
</div>
<div class="FormRow">
<a class="Button ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" id="ChangeReferralButton" href="/Login/ClearReferral" role="button" aria-disabled="false"><span class="ui-button-text">Update My Referrer</span></a>
</div>
</div>
</div>
<div id="CreateAccount_MainForm" style="display: block;">
<div class="FormRow">
<label>Country:</label>
<select id="ShipCountry" name="ShipCountry">
<option value="AU">Australia</option>
<option value="CA">Canada</option>
<option value="GB">United Kingdom</option>
<option value="NZ">New Zealand</option>
<option selected="selected" value="US">United States</option>
</select>
<span class="field-validation-valid" data-valmsg-for="ShipCountry" data-valmsg-replace="true"></span>
</div>
<div class="FormRow">
<label>First Name:</label>
<input data-val="true" data-val-required="Please Enter Your First Name" id="FirstName" name="FirstName" type="text" value="">
<span class="field-validation-valid" data-valmsg-for="FirstName" data-valmsg-replace="true"></span>
</div>
<div class="FormRow">
<label>Last Name:</label>
<input data-val="true" data-val-required="Please Enter Your Last Name" id="LastName" name="LastName" type="text" value="">
<span class="field-validation-valid" data-valmsg-for="LastName" data-valmsg-replace="true"></span>
</div>
<div class="FormRow">
<label>Email Address:</label>
<input data-val="true" data-val-email="Please Enter a Valid Email Address" data-val-remote="Your Email Address Has Been Used Already" data-val-remote-additionalfields="*.Email" data-val-remote-url="/JSON/CheckEmailAvailable" data-val-required="An Email Address is Required"
id="Email" name="Email" type="text" value="">
<span class="field-validation-valid" data-valmsg-for="Email" data-valmsg-replace="true"></span>
</div>
<div class="FormRow">
<label>Choose Username:</label>
<input data-val="true" data-val-length="Must Be 5 to 15 Characaters" data-val-length-max="15" data-val-length-min="3" data-val-regex="Invalid Characters" data-val-regex-pattern="(?!^\d+$)^[a-zA-Z0-9_]{3,15}$" data-val-remote="Username Already Taken" data-val-remote-additionalfields="*.UserName"
data-val-remote-url="/JSON/CheckUsernameAvailable" data-val-required="A Username is Required" id="UserName" name="UserName" type="text" value="">
<span class="field-validation-valid" data-valmsg-for="UserName" data-valmsg-replace="true"></span>
</div>
<div class="FormRow">
<label>Password:</label>
<input data-val="true" data-val-length="Minimum 6 Characters" data-val-length-max="25" data-val-length-min="6" data-val-required="A Password is Required" id="Password" name="Password" type="password">
<span class="field-validation-valid" data-valmsg-for="Password" data-valmsg-replace="true"></span>
</div>
<div class="FormRow">
<label>Confirm Password:</label>
<input data-val="true" data-val-equalto="Passwords Don't Match" data-val-equalto-other="*.Password" data-val-required="Please Confirm Your Password" id="PasswordConfirm" name="PasswordConfirm" type="password">
<span class="field-validation-valid" data-valmsg-for="PasswordConfirm" data-valmsg-replace="true"></span>
</div>
<div class="FormRow">
<label></label>
<button type="submit" id="CustomerLoginButton" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button" aria-disabled="false"><span class="ui-button-text">Create Customer Account</span></button>
</div>
<input type="hidden" name="returnUrl">
</div>
</form>
</div>

This is what I get. Try the code below and have fun.
<div class="content-block">
<h3><span class="icon16 profile"></span>Create New Customer Account</h3>
<form action="/Login/CreateAccount" id="CreateAccountForm" method="post"><input name="__RequestVerificationToken" type="hidden" value="4FW5wggFH2JRvjlOtLdoLf-myfT3aJ0xz8I_NYrsf2RZvufijY9M__XhgrGDrNExAtpRe3nVzBG3ErIuHVScfnNUGTUlsvWHHGJE_cz2uiI1"> <div class="content-block">
<div class="FormRow">
<strong>Please confirm your referring Promoter:</strong>
</div>
<div class="FormRow">
<label class="auto">
<input checked="checked" data-val="true" data-val-booleanrequired="You Must Confirm Your Retailer" data-val-required="You Must Confirm Your Retailer" id="ConfirmRetailer" name="ConfirmRetailer" type="radio" value="True">
<span class="field-validation-valid" data-valmsg-for="ConfirmRetailer" data-valmsg-replace="true"></span>
I was referred by <strong>Nicole Anderson (thrivecompany)</strong>
</label>
</div>
<div class="FormRow">
And this is the link of the CSS

You can inspect it on Google Chrome with F12 key to see what form is and what CSS is asociated with it. You can also download the code of the webpage if you right click on the webpage and press "Save As...". It will be stored in your computer a folder with all the CSS, JS, HTML, resources, etc that the webpage has.

Related

Href="#" works in localhost but not in public

I´m trying to implement a Login session in my website, but, i´m having trouble with this part:
<ul class="tab-group">
<li class="tab">Criar uma conta</li>
<li class="tab active">Possuo uma conta</li>
</ul>
<div class="tab-content">
<div id="login" name="login">
<h1>Bem vindo! ;)</h1>
<form action="principal.php" method="post" autocomplete="new-password">
<div class="field-wrap">
<label>
E-mail<span class="req">*</span>
</label>
<input class="tudomin" type="email" required autocomplete="new-password" name="email"/>
</div>
<div class="field-wrap">
<label>
Senha<span class="req">*</span>
</label>
<input type="password" required autocomplete="new-password" name="password"/>
</div>
<br/>
<p class="forgot">Esqueceu sua senha?</p>
<button class="button button-block" name="login" />Log In</button>
</form>
</div>
<div id="signup" name="signup">
<h1>Crie uma conta, é rapidinho!</h1>
<h5 style="color: red; background-color: white;">Sua conta será confirmada via SMS.</h5>
<br/>
<h6 style="color: red; background-color: white;">É necessário um telefone celular válido!</h6>
<form action="principal.php" method="post" autocomplete="new-password">
<div class="top-row">
<div class="field-wrap">
<label>
Nome<span class="req">*</span>
</label>
<input class="primaiusc" type="text" required autocomplete="new-password" name='firstname' />
</div>
<div class="field-wrap">
<label>
Sobrenome<span class="req">*</span>
</label>
<input class="primaiusc" style="text-transform: capitalize;" type="text"required autocomplete="new-password" name='lastname' />
</div>
</div>
<div class="field-wrap">
<!-- <input type="email"required autocomplete="off" name='email' style="display: none" /> Campo fake -->
<label>
E-mail<span class="req">*</span>
</label>
<input class="tudomin" type="email"required autocomplete="new-password" name='email' />
</div>
<div class="field-wrap">
<label>
Celular<span class="req">*</span>
</label>
<input type="text" required autocomplete="new-password" name='telefone' id='telefone' maxlength="15"/>
</div>
<div class="field-wrap">
<label style="left: calc(8.6em + 1vw)">
Data de Nascimento<span class="req">*</span>
</label>
<input type="date" required autocomplete="new-password" name='nascimento'/>
</div>
<div class="field-wrap">
<label style="left: calc(8.6em + 1vw)">
Instituição de Ensino<span class="req">*</span>
</label>
<select name="instituicao" class="req" required>
<option value="" disabled selected hidden></option>
<?php while($rowinst = mysqli_fetch_array($resultinst))
{
$datarowinst = '<option value="'.$rowinst['id'].'">'.$rowinst['instituicao'].'</option>';
echo $datarowinst;
}
?>
</select>
</div>
<div class="field-wrap">
<label style="left: calc(8.6em + 1vw)">
Período de Estudo<span class="req">*</span>
</label>
<select name="periodo" class="req" required>
<option value="" disabled selected hidden></option>
<option value="Manhã">Manhã</option>
<option value="Tarde">Tarde</option>
<option value="Noite">Noite</option>
<option value="Integral">Integral</option>
</select>
</div>
<div class="field-wrap">
<label>
Senha<span class="req">*</span>
</label>
<input type="password"required autocomplete="new-password" name='password'/>
</div>
<button type="submit" class="button button-block" name="register" />Criar conta!</button>
</form>
</div>
It supose to change the screen when a click on href="#signup" or href="#login".
And it works just fine on localhost but, for some reason it just doesn´t work on public. Any ideas?
To see what i´m talking about, this is the link:
https://www.educacaosc.com.br/Login/principal.php
Thanks!

Floating div in bootstrap

I have a contact form and I'mm trying to style it up so the recaptcha and submit botton floats left and sits below the contact Number field like so
The Contact Number field and Your message field are both set to take 6 columns on > medium devices but because the message field is multiple rows and has a gretaer height i would like to float the recaptcha and submit button in the area generated below the contact number.
How is this possible using bootstrap please? Can it be done?
My form code is as follows
<!-- Contact section -->
<section id="contact">
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<h2 class="section-heading">Contact Us</h2>
<h3 class="section-subheading text-muted">Lorem ipsum dolor sit amet consectetur.</h3>
</div>
</div><!-- /.row -->
<div class="row">
<div class="col-lg-12">
<form action="/" enctype="multipart/form-data" method="post"> <fieldset>
<legend>Contact Form</legend>
<div class="col-md-6">
<div class="form-group">
<label for="FullName">Full Name</label>
<input class="form-control" data-val="true" data-val-required="The Full Name field is required." id="FullName" name="FullName" placeholder="Full Name" type="text" value="" />
<span class="field-validation-valid" data-valmsg-for="FullName" data-valmsg-replace="true"></span>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="Email">E-Mail</label>
<input class="form-control" data-val="true" data-val-email="The E-Mail field is not a valid e-mail address." data-val-required="The E-Mail field is required." id="Email" name="Email" placeholder="Email Address" type="text" value="" />
<span class="field-validation-valid" data-valmsg-for="Email" data-valmsg-replace="true"></span>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="ContactNumber">Contact Number</label>
<input class="form-control" data-val="true" data-val-email="The Contact Number field is not a valid e-mail address." id="ContactNumber" name="ContactNumber" placeholder="Contact Number" type="text" value="" />
<span class="field-validation-valid" data-valmsg-for="ContactNumber" data-valmsg-replace="true"></span>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="Message">Message</label>
<textarea class="form-control" cols="20" data-val="true" data-val-required="The Message field is required." id="Message" name="Message" placeholder="Your Message" rows="2">
</textarea>
<span class="field-validation-valid" data-valmsg-for="Message" data-valmsg-replace="true"></span>
</div>
</div>
<div class="recaptcha col-md-6">
<div class="g-recaptcha" data-sitekey="#"></div>
<span class="field-validation-valid" data-valmsg-for="Captcha" data-valmsg-replace="true"></span>
<input type="submit" id="submit" name="submit" value="Send Message" class="btn btn-primary btn-lg btn-block btn-biru"/>
</div>
</fieldset>
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
</form>
</div><!-- /.col-lg-12 -->
</div><!-- /.row -->
</div><!-- /.container -->
</section>
Here is a fiddle of my form if it helps you help me :)
https://jsfiddle.net/cmstzmyv/
You should set your layout as having 2 columns.
Instead of x col-md-6, just set your left content in a first col-xx-6 and the right area in another col-xx-6
Here is a bootply : http://www.bootply.com/zXGGqQTe1A
HTML
<form action="/" enctype="multipart/form-data" method="post"> <fieldset>
<legend>Contact Form</legend>
<div class="col-md-6">
<div class="form-group">
<label for="FullName">Full Name</label>
<input class="form-control" data-val="true" data-val-required="The Full Name field is required." id="FullName" name="FullName" placeholder="Full Name" value="" type="text">
<span class="field-validation-valid" data-valmsg-for="FullName" data-valmsg-replace="true"></span>
</div>
<div class="form-group">
<label for="ContactNumber">Contact Number</label>
<input class="form-control" data-val="true" data-val-email="The Contact Number field is not a valid e-mail address." id="ContactNumber" name="ContactNumber" placeholder="Contact Number" value="" type="text">
<span class="field-validation-valid" data-valmsg-for="ContactNumber" data-valmsg-replace="true"></span>
</div>
<div class="recaptcha">
<div class="g-recaptcha" data-sitekey="#"></div>
<span class="field-validation-valid" data-valmsg-for="Captcha" data-valmsg-replace="true"></span>
<input id="submit" name="submit" value="Send Message" class="btn btn-primary btn-lg btn-block btn-biru" type="submit">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="Email">E-Mail</label>
<input class="form-control" data-val="true" data-val-email="The E-Mail field is not a valid e-mail address." data-val-required="The E-Mail field is required." id="Email" name="Email" placeholder="Email Address" value="" type="text">
<span class="field-validation-valid" data-valmsg-for="Email" data-valmsg-replace="true"></span>
</div>
<div class="form-group">
<label for="Message">Message</label>
<textarea class="form-control" cols="20" data-val="true" data-val-required="The Message field is required." id="Message" name="Message" placeholder="Your Message" rows="2"> </textarea>
<span class="field-validation-valid" data-valmsg-for="Message" data-valmsg-replace="true"></span>
</div>
</div>
</fieldset>
<script src="https://www.google.com/recaptcha/api.js" async="" defer=""></script>
</form>

The fields and text boxes will not line up in my HTML form

I am still working on a project for school that is a web site for my children. I just put in a form but the fields don't seem to line up with the text boxes. I don't see what I'm doing wrong. I've searched the web and this site for answers. I believe the teacher wants the form to actually be set up within and using form tags. Any help is appreciated. Here is my HTML for my form.
<section>
<div id="salesDetails"><h2>Sales Details</h2>
<form name="checkOut" method="post" method="get" action="mailto:etw11241#aol.co&#109";>
<div class="formRow">
<label for="contactName"><p>Contact Name</p></label>
<input autofocus autocomplete="off" name="contactName" id="contactName" type="text" size="50"
placeholder="Enter your full name." required autofocus/>
</div>
<div class="formRow">
<label for="phoneNumber"><p>Phone Number</p></label>
<input placeholder="Include area code" name="phoneNumber" id="phoneNumber" type="tel" size="50" required/>
</div>
<div class="formRow">
<label for="emailAddress"><p>Email Address</p></label>
<input name="emailAddress" id="emailAddress" type="email" size="50" required/>
</div>
<div class="formRow">
<label for="address"><p>Address</p></label>
<input name="address" id="address" type="text" size="50" required/>
</div>
<div class="formRow">
<label for="serviceSelection"><p>Service Selection</label>
<select name="serviceSelection" id="serviceSelection" multiple="multiple" required>
<option value="-1">-Select (Max 2)-</option>
<option value="1">Lawnmowing/Front Yard----00001----$10</option>
<option value="2">Lawnmowing/Backyard----00002----$10</option>
<option value="3">Lawnmowing/Whole Yard----00003----$20</option>
<option value="4">Leaf Raking/Front Yard----00004----$15</option>
<option value="5">Leaf Raking/Backyard----00005----$15</option>
<option value="6">Leaf Raking/Whole Yard----00006----$30</option>
<option value="7">Snow Shoveling/Average Driveway----00007----$20</option>
<option value="8">Snow Shoveling/Long Driveway----00008----$30</option>
</select>
</div>
<div class="formRow">
<label for="specialRequests"><p>Special Requests</p></label>
<textarea cols="40" rows="6" name="specialRequests" id="specialRequests" ></textarea>
</div>
<div class="formRow">
<label for="serviceNeededBy"><p>Service Needed By</p></label>
<input name="serviceNeededBy" id="serviceNeededBy" type="date" size="50"/>
</div>
<div class="formRow">
<input style="width:70px" type="submit" value="Submit"/>
<input style="width:70px" type="reset" value="Reset"/>
</div>
</section>
Am I missing HTML or CSS dimensions?
That's because you've displayed the fields within paragraphs which will result in linebreaks by default after the field.
Try the following HTML :
<section>
<div id="salesDetails">
<h2>Sales Details</h2>
<form name="checkOut" method="post" method="get" action="mailto:etw11241#aol.co&#109" ;>
<div class="formRow">
<label for="contactName">
Contact Name
</label>
<input autofocus autocomplete="off" name="contactName" id="contactName" type="text" size="50" placeholder="Enter your full name." required autofocus/>
</div>
<div class="formRow">
<label for="phoneNumber">
Phone Number
</label>
<input placeholder="Include area code" name="phoneNumber" id="phoneNumber" type="tel" size="50" required/>
</div>
<div class="formRow">
<label for="emailAddress">
Email Address
</label>
<input name="emailAddress" id="emailAddress" type="email" size="50" required/>
</div>
<div class="formRow">
<label for="address">
Address
</label>
<input name="address" id="address" type="text" size="50" required/>
</div>
<div class="formRow">
<label for="serviceSelection">
Service Selection</label>
<select name="serviceSelection" id="serviceSelection" multiple="multiple" required>
<option value="-1">-Select (Max 2)-</option>
<option value="1">Lawnmowing/Front Yard----00001----$10</option>
<option value="2">Lawnmowing/Backyard----00002----$10</option>
<option value="3">Lawnmowing/Whole Yard----00003----$20</option>
<option value="4">Leaf Raking/Front Yard----00004----$15</option>
<option value="5">Leaf Raking/Backyard----00005----$15</option>
<option value="6">Leaf Raking/Whole Yard----00006----$30</option>
<option value="7">Snow Shoveling/Average Driveway----00007----$20</option>
<option value="8">Snow Shoveling/Long Driveway----00008----$30</option>
</select>
</div>
<div class="formRow">
<label for="specialRequests">
Special Requests
</label>
<textarea cols="40" rows="6" name="specialRequests" id="specialRequests"></textarea>
</div>
<div class="formRow">
<label for="serviceNeededBy">
Service Needed By
</label>
<input name="serviceNeededBy" id="serviceNeededBy" type="date" size="50" />
</div>
<div class="formRow">
<input style="width:70px" type="submit" value="Submit" />
<input style="width:70px" type="reset" value="Reset" />
</div>
</section>
I usually do something like this :
<form action="">
<div class="control">
<div class="label">
<label for="something">Something</label>
</div>
<div class="input">
<input type="text" name="something">
</div>
</div>
</form>
The notion is that we wrap each label/input in its own container, and provide two containing elements for the actual form fields themselves. Let the label float to the side, and provide an equal amount of margin-left on the input container.
.control .label{
float:left;
width:80px;
display:inline;
}
.control .input{
margin-left:100px;
}
This makes for a very tidy layout, containing all types of different form fields; a very dependable and easily controllable pattern.
A bit like so :
https://jsfiddle.net/64jnaqak/

Mailchimp advance form integration

Hello I have signup contact form that has a checkbox for news and updates of the site.
I'll be integrating the mailchimp for this
Any help?
Here is my HTML code
<form role="form" id="feedbackForm">
<div class="col-lg-6">
<div class="form-group">
<label class="control-label" for="textinput">First Name<span class="required">*</span></label>
<input type="text" class="form-control required" id="first_name" name="first_name" placeholder="Enter your First Name"/>
<span class="help-block" style="display: none;">Please enter your first name.</span>
</div>
<div class="form-group">
<label class="control-label" for="textinput">Last Name<span class="required">*</span></label>
<input type="text" class="form-control" id="last_name" name="last_name" placeholder="Enter your Last Name"/>
<span class="help-block" style="display: none;">Please enter your last name.</span>
</div>
<div class="form-group">
<label class="control-label" for="textinput">Email Address<span class="required">*</span></label>
<input type="email" class="form-control" id="email" name="email" placeholder="Enter your email address"/>
<span class="help-block" style="display: none;">Please enter a valid e-mail address.</span>
</div>
<div class="form-group">
<label class="control-label" for="textinput">Company Name</label>
<input type="email" class="form-control" id="company_name" name="company_name" placeholder="Enter your company name"/>
</div>
<div class="form-group">
<label class="control-label" for="textinput">Message<span class="required">*</span></label>
<textarea rows="10" cols="100" class="form-control" id="message" name="message" placeholder="Enter your message"></textarea>
<span class="help-block" style="display: none;">Please enter a message.</span>
</div>
</div>
<div class="col-lg-6">
<div class="form-group">
<label for="selectbasic">How did you hear about us?</label>
<select id="selectbasic" name="selectbasic" class="form-control">
<option>Select</option>
<option value="Search Engine">Search engine</option>
<option value="Microsoft DPE">Microsoft DPE</option>
<option value="Microsoft Event">Microsoft event</option>
<option value="Social Media">Social media</option>
<option value="Word of Mouth">Word of mouth</option>
<option value="Other">Other</option>
</select>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="inlineCheckbox1" value="option1"> Please keep me informed of kinectAPI product updates and news
</label>
</div>
<img id="captcha" src="library/vender/securimage/securimage_show.php" alt="CAPTCHA Image" />
Show a Different Image<br/>
<div class="form-group" style="margin-top: 10px;">
<input type="text" class="form-control" name="captcha_code" id="captcha_code" placeholder="For security, please enter the code displayed in the box." />
<span class="help-block" style="display: none;">Please enter the code displayed within the image.</span>
</div>
<span class="help-block" style="display: none;">Please enter a the security code.</span>
<button type="submit" id="feedbackSubmit" class="btn btn-purple btn-md message-btn">Submit Message</button>
</div>
</form>
Thank you so much
If you want to use your own custom form for creating new subscribers you'll need to post your data and interact with the mailchimp api found Here
Although this is possible, the way mailchimp is setup... It makes adding subscribers much more simple. I'd recommend creating your form from there end and embedding it into your html... It is mobile friendly By the way... Good Luck !
If you want to integrate users to Mailchimp then the simple way is to use Mailchimp embed forms. This is very easy and simple. Just put the embed code in your page and it start working.
http://kb.mailchimp.com/article/how-can-i-add-my-signup-form-on-my-website/

How to style input with radio addon for error messages - twitter bootstrap

I am trying to style input field with radio addon for error message (.help-block). it works fine without radio addons . But with addon, text jump to new line under input field.
it is look like this
HTML
<div class="input-group has-error">
<span class="input-group-addon">
<input type="radio" name="answer" value="a">
</span>
<input type="text" class="form-control" placeholder="Your answer here..." name="a" id="a">
<span class="help-block">The a field is required</span>
</div>
So what should I do that provided by bootstrap 3.
I was doing it incorrectly.
<div class="form-group has-error">
<label for="a">Answer A</label>
<div class="input-group ">
<span class="input-group-addon">
<input type="radio" name="answer" value="a">
</span>
<input type="text" class="form-control" placeholder="Your answer here..." name="a" id="a">
</div>
<span class="help-block">The a field is required.</span>
</div>
If you want to show messages in same line, instead of help-block (if it suffices), you can use tool-tip, here is a DEMO
HTML
<div class="input-group has-error">
<span class="input-group-addon">
<input type="radio" name="answer" value="a" class="" />
</span>
<input type="text" class="form-control " placeholder="Your answer here..." name="a" id="a" />
<span class="input-group-addon">
<span data-toggle="tooltip" title="" data-container="" >
This field is required
</span>
</span>
</div>