How to change the view in this form? - html

Following this post , I try to imply the style -
.mktoFormRow:nth-child(odd) {
float: left;
}
on the follow form -
<form id="mktoForm_17" novalidate="novalidate" class="mktoForm mktoHasWidth mktoLayoutLeft" style="font-family: inherit; font-size: 13px; color: rgb(51, 51, 51); width: 171px;" __biza="WJ__">
<input type="hidden" id="country" name="country" value="Israel"><input type="hidden" id="00Nw0000003PHyq" name="00Nw0000003PHyq" value=""><input type="hidden" id="00Nw0000003PHyx" name="00Nw0000003PHyx" value=""><input type="hidden" id="00Nw0000003PHyz" name="00Nw0000003PHyz" value=""><input type="hidden" id="00Nw0000003PHyy" name="00Nw0000003PHyy" value=""><input type="hidden" id="00Nw0000003PHyl" name="00Nw0000003PHyl" value=""><input type="hidden" id="00Nw0000003PHyr" name="00Nw0000003PHyr" value=""><input type="hidden" id="00Nw0000003PHyn" name="00Nw0000003PHyn" value=""><input type="hidden" id="00Nw0000003PHyo" name="00Nw0000003PHyo" value=""><input type="hidden" id="00Nw0000003PHyv" name="00Nw0000003PHyv" value=""><input type="hidden" id="00Nw0000003PHyp" name="00Nw0000003PHyp" value=""><input type="hidden" id="00Nw0000003PHyu" name="00Nw0000003PHyu" value=""><input type="hidden" id="00Nw0000003PHys" name="00Nw0000003PHys" value=""><input type="hidden" id="00Nw0000003PHym" name="00Nw0000003PHym" value=""><input type="hidden" id="00Nw0000003PHyw" name="00Nw0000003PHyw" value=""><input type="hidden" id="00Nw0000003PHyt" name="00Nw0000003PHyt" value="http://localhost/codefuel/">
<style type="text/css"></style>
<div class="mktoFormRow">
<div class="mktoFieldDescriptor mktoFormCol" style="margin-bottom: 5px;">
<div class="mktoOffset" style="width: 5px;"></div>
<div class="mktoFieldWrap mktoRequiredField">
<label for="FirstName" class="mktoLabel mktoHasWidth" style="width: 10px;">
<div class="mktoAsterix">*</div>
</label>
<div class="mktoGutter mktoHasWidth" style="width: 5px;"></div>
<input id="FirstName" name="FirstName" placeholder="Name" maxlength="255" title="" type="text" class="mktoField mktoTextField mktoHasWidth mktoRequired mktoInvalid" style="width: 150px;">
<div class="mktoClear"></div>
</div>
<div class="mktoClear"></div>
</div>
<div class="mktoClear"></div>
</div>
<div class="mktoFormRow">
<div class="mktoFieldDescriptor mktoFormCol" style="margin-bottom: 5px;">
<div class="mktoOffset" style="width: 5px;"></div>
<div class="mktoFieldWrap mktoRequiredField">
<label for="PersonEmail" class="mktoLabel mktoHasWidth" style="width: 10px;">
<div class="mktoAsterix">*</div>
</label>
<div class="mktoGutter mktoHasWidth" style="width: 5px;"></div>
<input id="PersonEmail" name="PersonEmail" placeholder="Email" maxlength="80" type="email" class="mktoField mktoEmailField mktoHasWidth mktoRequired" style="width: 150px;">
<div class="mktoClear"></div>
</div>
<div class="mktoClear"></div>
</div>
<div class="mktoClear"></div>
</div>
<div class="mktoFormRow">
<div class="mktoFieldDescriptor mktoFormCol" style="margin-bottom: 5px;">
<div class="mktoOffset" style="width: 5px;"></div>
<div class="mktoFieldWrap mktoRequiredField">
<label for="Application_Download_Link__c" class="mktoLabel mktoHasWidth" style="width: 10px;">
<div class="mktoAsterix">*</div>
</label>
<div class="mktoGutter mktoHasWidth" style="width: 5px;"></div>
<input id="Application_Download_Link__c" name="Application_Download_Link__c" placeholder="Software URL" maxlength="255" type="url" class="mktoField mktoUrlField mktoHasWidth mktoRequired" style="width: 150px;">
<div class="mktoClear"></div>
</div>
<div class="mktoClear"></div>
</div>
<div class="mktoClear"></div>
</div>
<div class="mktoFormRow">
<div class="mktoFieldDescriptor mktoFormCol" style="margin-bottom: 5px;">
<div class="mktoOffset" style="width: 5px;"></div>
<div class="mktoFieldWrap mktoRequiredField">
<label for="Daily_Installs__c" class="mktoLabel mktoHasWidth" style="width: 10px;">
<div class="mktoAsterix">*</div>
</label>
<div class="mktoGutter mktoHasWidth" style="width: 5px;"></div>
<select id="Daily_Installs__c" name="Daily_Installs__c" class="mktoField mktoHasWidth mktoRequired" style="width: 150px;">
<option value="">Select...</option>
<option value="0-100">0-100</option>
<option value="100-500">100-500</option>
<option value="500-1,000">500-1,000</option>
<option value="More than 1,000">More than 1,000</option>
<option value="Not Applicable">Not Applicable</option>
</select>
<div class="mktoClear"></div>
</div>
<div class="mktoClear"></div>
</div>
<div class="mktoClear"></div>
</div>
<div class="mktoButtonRow"><span class="mktoButtonWrap mktoNative" style="margin-left: 110px;"><button type="submit" class="mktoButton">Submit</button></span></div>
<input type="hidden" name="formid" class="mktoField mktoFieldDescriptor" value="17"><input type="hidden" name="munchkinId" class="mktoField mktoFieldDescriptor" value="955-BUF-612">
</form>
but nothing got change in the view (here the Demo) .
There is 4 <div class="mktoFormRow"> there .
How could I achieve the view as the result here using nth-child selector ?

Your form has an explicit width of 171px, so those divs don't have enough space to be placed on the same line. Just remove the explicit width, so it will default to 100% (and you probably want even children to be left-floated instead of odd ones).
Solution: http://jsfiddle.net/c4YL4/18/

I will change pretty munch of your code, but, you could display every <div class="mktoFormRow"> as an inline-block and float everything to the left... you will get an horizontal line of those divs. then you could use nth-child(2nd) to clear right every two divs and you will get rows of 2 divs each one... I hope this help.

Related

How to send Drop down Data from html form to Sheets Connected with Google Forms?

I have been trying hard to send the dropdown data from html forms to google sheets.
This is my Google form
I have already tried this but no success.
<select id="Drop">
<option value="entry.392977065">Hi</option>
</select>
Please suggest edit in my code.
Thanks
<form action="https://docs.google.com/forms/u/0/d/e/1FAIpQLScT1X-3A9Tf75BVECVeJtMAnSYzCdr87K3XVKyMvZJQOdB13Q/formResponse"target="_self" method="POST">
<section id="contatus" class="section">
<div class="contact-form md-m-30px-b col-lg-6 offset-lg-3">
<h2 style="text-align: center;">Entre em contato</h2>
<form class="contactform" action="#" method="post">
<div class="row">
<div class="col-md-6" style="text-align: center;">
<div class="form-group">
<input id="name" class="form-xl form-control" name="entry.1816959266" required="" type="text" placeholder="name" />
</div>
</div>
<div class="col-md-6" style="text-align: center;">
<div class="form-group">
<input id="mobile" class="form-xl form-control" name="entry.2118312539" required="" type="email" placeholder="Email" />
</div>
</div>
<div class="col-md-6" style="text-align: center;">
<div class="form-group">
<input id="id" class="form-xl form-control" name="entry.1541086304" required="" type="text" placeholder="Celular" />
</div>
</div>
<div class="col-md-6" style="text-align: center;">
<div class="form-group">
<input id="email" class="form-xl form-control" maxlength="15" name="entry.108846225" required="no" type="text" placeholder="Telefone fixo" />
</div>
</div>
<div class="col-md-12" style="text-align: center;">
<div class="form-group">
<textarea id="Drop 1" class="form-xl form-control" name="entry.392977065" required="" placeholder="Mensagem"></textarea>
</div>
</div>
<div class="col-md-12" style="text-align: center;">
<div class="form-group">
<textarea id="Drop 2" class="form-xl form-control" name="entry.329000339" required="" placeholder="Mensagem"></textarea>
</div>
</div>
<div class="col-md-12">
<div class="send" style="text-align: center;">
<button class="btn btn-theme" name="submit" type="submit"> Enviar</button>
</div>
</div>
</div>
</form>
</div>
faz um teste e vĂȘ se funciona dessa forma.

How to make bootstrap form-inline Horizontal scrollable

My form is way too large I want to make it scrollable without breaking line. How can I do this?
HTML:
<div id="item_group">
<div class="form-group form-md-line-input" style="">
<label>Item</label>
<select class="form-control " data-live-search="true" name="" id="" style="">
<option>Select Item</option>
<option value="23">Styler King 6 Card Holder (Set of 1, Khaki)</option>
</select>
</div>
<div class="form-group form-md-line-input" style="">
<label>Unit</label>
<select class="form-control " data-live-search="true" name="" id="" style="">
<option>Select Unit</option>
<option value="1">Piece</option>
<option value="2">Box</option>
<option value="4">Sub Box</option>
</select>
</div>
<div class="form-group form-md-line-input">
<input type="number" class="form-control" id="form_control_1" name="" style="" value="0">
<label for="form_control_1">Quantity</label>
</div>
<div class="form-group form-md-line-input">
<input type="number" class="form-control" id="form_control_1" name="" style="" value="0">
<label for="form_control_1">Sale Rate</label>
</div>
<div class="form-group form-md-line-input">
<input type="number" class="form-control" id="form_control_1" name="" style="" value="0">
<label for="form_control_1">Discount</label>
</div>
<div class="form-group form-md-line-input">
<input type="number" class="form-control" id="form_control_1" name="" style="" value="0">
<label for="form_control_1">CGST</label>
</div>
<div class="form-group form-md-line-input">
<input type="number" class="form-control" id="form_control_1" name="" style="" value="0">
<label for="form_control_1">SGST</label>
</div>
<div class="form-group form-md-line-input">
<input type="number" class="form-control" id="form_control_1" name="" style="" value="0">
<label for="form_control_1">IGST</label>
</div>
<div class="form-group form-md-line-input">
<input type="number" class="form-control" id="form_control_1" name="" style="" value="0">
<label for="form_control_1">Net Rate</label>
</div>
<div class="form-group form-md-line-input">
<input type="number" class="form-control" id="form_control_1" name="" style="" value="0">
<label for="form_control_1">Net Amount</label>
</div>
<input type="hidden" value="1" id="total_item">
<div class="col-md-12" style="padding-left: 0px; padding-right: 0px">
<div class="form-actions noborder">
<button class="btn blue" style="width: 100%;" onclick="addnewitem()"><i class="fa fa-plus"></i>Add New Item</button>
</div>
</div>
</div>
URL:
http://vsss.co.in/Admin/index.php/Sales
Inline Form Image
If you want horizontal scroll to you form, Then add this
overflow: scroll; height: 400px; to this class .portlet.light
As per your code,
.portlet.light {
padding: 12px 20px 15px;
background-color: #fff;
overflow: scroll;
height: 400px;
}

Weebly button broken

I am trying to get the log in button to work pressing enter in either field posts the form and the button appears but does nothing. Here is the code, any ideas?
Thanks a bunch in advance!
<div><form id="login" action="" method="POST">
<div id="login-form-parent" class="wsite-form-container" style="margin-top: 0px;margin-right: 0px; margin">
<h2 class="wsite-content-title" style="text-align: center;">
<span style="font-size: large;">Please enter your credentials</span></h2>
<div>
<div style= "text-align: center";>
<label class="wsite-form-label" for="name">Username</label>
<div>
<input id="input-616817079299148233" class="wsite-form-input wsite-input wsite-input-width-370px" name="username" type="text" />
</div>
</div>
</div>
<div style="margin-top: 15px;margin-bottom: 15px;"></div>
<div>
<div style="text-align: center";>
<label class="wsite-form-label" for="password">Password</label>
<div>
<input id="input-984837360768012607" class="wsite-form-input wsite-input wsite-input-width-370px" name="pwd" type="password" />
</div>
</div>
</div>
</div>
<div style="display: none; visibility: hidden;"><input name="wsite_subject" type="text" />
</div>
<div style="text-align: center; margin-top: 10px; margin-bottom: 0px;">
<input name="form_version" type="hidden" value="2" />
<input id="wsite-approved" name="wsite_approved" type="hidden" value="approved" />
<input name="ucfid" type="hidden" value="login" />
<input style="position: absolute; top: 0; left: -9999px; width: 1px; height: 1px;" type="submit" />
<a class="wsite-button">
<span class="wsite-button-inner">Submit</span></a></div>
</form></div>
there's no action linked to the form.. fill in action=" " linking to your log in php page.
You would need some handler using jQuery from .wsite-button-inner to trigger your <input type="sumbmit">. Since you hid your input button off screen. When using java script to handle it to have a fancy button best practice would be to add JavaScript validation (not shown in code).
Ie: document.getElementById("login").submit();
or
function submitform()
{
document.login.submit();
}
<div><form id="login" action="" method="POST">
<div id="login-form-parent" class="wsite-form-container" style="margin-top: 0px;margin-right: 0px; margin">
<h2 class="wsite-content-title" style="text-align: center;">
<span style="font-size: large;">Please enter your credentials</span></h2>
<div>
<div style= "text-align: center";>
<label class="wsite-form-label" for="name">Username</label>
<div>
<input id="input-616817079299148233" class="wsite-form-input wsite-input wsite-input-width-370px" name="username" type="text" />
</div>
</div>
</div>
<div style="margin-top: 15px;margin-bottom: 15px;"></div>
<div>
<div style="text-align: center";>
<label class="wsite-form-label" for="password">Password</label>
<div>
<input id="input-984837360768012607" class="wsite-form-input wsite-input wsite-input-width-370px" name="pwd" type="password" />
</div>
</div>
</div>
</div>
<div style="display: none; visibility: hidden;"><input name="wsite_subject" type="text" />
</div>
<div style="text-align: center; margin-top: 10px; margin-bottom: 0px;">
<input name="form_version" type="hidden" value="2" />
<input id="wsite-approved" name="wsite_approved" type="hidden" value="approved" />
<input name="ucfid" type="hidden" value="login" />
<input style="position: absolute; top: 0; left: -9999px; width: 1px; height: 1px;" type="submit" />
<a href="javascript: submitform()" class="wsite-button">
<span class="wsite-button-inner">Submit</span></a></div>
</form></div>
Inline html:
<div><form id="login" action="" method="POST">
<div id="login-form-parent" class="wsite-form-container" style="margin-top: 0px;margin-right: 0px; margin">
<h2 class="wsite-content-title" style="text-align: center;">
<span style="font-size: large;">Please enter your credentials</span></h2>
<div>
<div style= "text-align: center";>
<label class="wsite-form-label" for="name">Username</label>
<div>
<input id="input-616817079299148233" class="wsite-form-input wsite-input wsite-input-width-370px" name="username" type="text" />
</div>
</div>
</div>
<div style="margin-top: 15px;margin-bottom: 15px;"></div>
<div>
<div style="text-align: center";>
<label class="wsite-form-label" for="password">Password</label>
<div>
<input id="input-984837360768012607" class="wsite-form-input wsite-input wsite-input-width-370px" name="pwd" type="password" />
</div>
</div>
</div>
</div>
<div style="display: none; visibility: hidden;"><input name="wsite_subject" type="text" />
</div>
<div style="text-align: center; margin-top: 10px; margin-bottom: 0px;">
<input name="form_version" type="hidden" value="2" />
<input id="wsite-approved" name="wsite_approved" type="hidden" value="approved" />
<input name="ucfid" type="hidden" value="login" />
<input style="position: absolute; top: 0; left: -9999px; width: 1px; height: 1px;" type="submit" />
<a href="javascript: submitform()" class="wsite-button">
<span class="wsite-button-inner">Submit</span></a></div>
</form></div>
<script type="text/javascript">
function submitform()
{
document.login.submit();
}
</script>

How to set this div with height as auto?

I have a div with css as this
#middle2 {
background: none repeat scroll 0 0 #ffffff;
border: 1px solid #e5e5e5;
border-radius: 15px;
height: 480px;
margin-left: 230px;
margin-top: 20px;
position: absolute;
width: 500px;
}
The html is this one
<div id="middle2" style="height: auto; overflow: hidden;">
<div id="envelop"></div>
<div id="envelop_title">Create your Account</div>
<div id="e_text">
<p>Creating a account is very easy. Just fill-in the form below, click Submit and then proceed to Login! All done!
</p>
</div>
<div id="c_form">
<div id="form_content" style="height:auto; overflow: hidden;">
<form method="post" action="#" onsubmit="return validation()">
<div class="form_row">
<label class=""><span class="star">*</span> First Name</label>
<div class="inputstyle">
<input class="input_col2" type="text" value="" name="first_name" id="np_first_name"/>
<div id="firstName_msg" class="div_msg"></div>
</div>
</div>
<div class="form_row">
<label class=""><span class="star">*</span> Last Name</label>
<div class="inputstyle">
<input class="input_col2" type="text" value="" name="last_name" id="np_last_name"/>
<div id="lastName_msg" class="div_msg"></div>
</div>
</div>
<div class="form_row">
<label class=""><span class="star">*</span> E-mail</label>
<div class="inputstyle">
<input class="input_col2" type="text" value="" name="email" id="np_email" onkeyup="check_email()" autocomplete="off"/>
<input type="hidden" id="ch_add" name="ch_add" value="">
<div id="email_msg" class="div_msg"></div>
</div>
</div>
<div class="form_row">
<label class=""><span class="star">*</span> Password </label>
<div class="inputstyle">
<input class="input_col2" type="password" value="" name="password" id="np_password"/>
<div id="pwd_msg" class="div_msg"></div>
</div>
</div>
<div class="form_row">
<label class=""><span class="star">*</span> Confirm Password </label>
<div class="inputstyle">
<input class="input_col2" type="password" value="" name="cpassword" id="np_cpassword"/>
<input type="hidden" name="ip" id="np_ip" value="<?php echo $this->input->ip_address();?>">
<div id="cpwd_msg" class="div_msg"></div>
</div>
</div>
<div class="form_row">
<label class=""><span class="star">*</span> Contact </label>
<div class="inputstyle">
<input class="input_col2" type="text" value="" name="contact" id="contact"/>
<div id="cpwd_msg" class="div_msg"></div>
</div>
</div>
<div class="form_row">
<label class=""><span class="star">*</span> Address </label>
<div class="inputstyle">
<textarea class="input_col2" name="address" id="address"></textarea>
<div id="cpwd_msg" class="div_msg"></div>
</div>
</div>
<div class="form_row">
<label class=""><span class="star">*</span> Country </label>
<div class="inputstyle">
<select class="input_col2" id="country" name="country"
onchange="get_state(this.value,'state');">
<option value="0">Select Country</option>
<?php
$country_list = $this->autoload_model->get_data_from_table("td_country","*",
"country_title LIKE '%Canada%'")->result_array();
foreach($country as $bil_cnt)
{?>
<option value="<?php echo $bil_cnt['country_id'];?>">
<?php echo $bil_cnt['country_title'];?>
</option>
<?php
}?>
</select>
<div id="cpwd_msg" class="div_msg"></div>
</div>
</div>
<div class="form_row">
<label class=""><span class="star">*</span> State </label>
<div class="inputstyle">
<img src="<?php echo base_url();?>assets/front_assets/images/ajax-loader-1.gif" style="margin: 0 0 0 20px; display:none" id="state_loader"/>
<select class="input_col2" id="state" name="state"
onchange="get_city(this.value,'city')">
<option value="0">Select State</option>
</select>
<div id="cpwd_msg" class="div_msg"></div>
</div>
</div>
<div class="form_row">
<label class=""><span class="star">*</span> City </label>
<div class="inputstyle">
<img src="<?php echo base_url();?>assets/front_assets/images/ajax-loader-1.gif" style="margin: 0 0 0 20px; display:none" id="city_loader"/>
<select class="input_col2" id="city" name="city">
<option value="0">Select City/Suburb</option>
</select>
<div id="cpwd_msg" class="div_msg"></div>
</div>
</div>
<div class="form_row" id="np_register_message">
</div>
<div id="f_button" style="width:123px; height:34px; margin:0 auto; margin-top:30px;">
<img src="<?php echo base_url();?>assets/front_assets/images/button.jpg" style="width:98px;height:35px;"/>
</div>
<div id="f_bottom"></div>
</form>
</div>
</div>
</div>
But the problem is i am getting the div in this way?
How can i solve this issue. I want the div should have auto height and it will stretch automatically
If I interpret your image correctly, the div is adjusting its height automatically.
But, because you have used:
position: absolute
that div is no longer in the flow of the page. This means that elements below it can move up to overlap.
If that is the problem, there are a variety of ways to fix it depending on what the rest of the page is like.

inline form Bootstrap is not working

I don't understand why this is not working. I'm trying to get these two form elements side by side. Also I would like to be able to have some elements side by side and some arranged below in the same form (as in future elements will be below these two). I left off the role="form" since I'm using Struts 1 and this breaks the <html:form> tag.
<form name="someForm" method="post" action="/someAction.do" class="form-inline">
<div class="form-group">
<div>
<label for="startDate" >
From
</label>
<input type="text" name="startDate" value="" readonly="readonly" id="startDate" style="width: 70px;" class="datepicker form-control">
</div>
</div>
<div class="form-group">
<div>
<label for="endDate">
To
</label>
<input type="text" name="endDate" value="" readonly="readonly" id="endDate" style="width: 70px;" class="datepicker form-control">
</div>
</div>
JSFiddle
You have to put your controls into an input-group:
<form name="someForm" method="post" action="/someAction.do" class="form-inline">
<div class="input-group">
<div class="form-group">
<div>
<label for="startDate" >
From
</label>
<input type="text" name="startDate" value="" readonly="readonly" id="startDate" style="width: 70px;" class="datepicker form-control">
</div>
</div>
<div class="form-group">
<div>
<label for="endDate">
To
</label>
<input type="text" name="endDate" value="" readonly="readonly" id="endDate" style="width: 70px;" class="datepicker form-control">
</div>
</div>
</div>
</form>
http://jsfiddle.net/3h3NB/3/
EDIT:
Or you can try using grids:
<form>
<div class="container">
<div class="row">
<div class="col-xs-1">
<label for="startDate">from</lable>
</div>
<div class="col-xs-3">
<input type="text" name="startDate" value="" readonly="readonly" id="startDate"class="datepicker form-control">
</div>
<div class="col-xs-1">
<label for="endDate">to</lable>
</div>
<div class="col-xs-3">
<input type="text" name="endDate" value="" readonly="readonly" id="startDate" class="datepicker form-control">
</div>
</div>
</div>
</form>
http://jsfiddle.net/3h3NB/76/
You can do this on the HTML
<form name="someForm" method="post" action="/someAction.do" class="form-inline">
<div class="form-group">
<label for="startDate" >
From
</label>
<input type="text" name="startDate" value="" readonly="readonly" id="startDate" style="width: 70px;" class="datepicker form-control"/>
</div>
<div class="form-group">
<label for="endDate">
To
</label>
<input type="text" name="endDate" value="" readonly="readonly" id="endDate" style="width: 70px;" class="datepicker form-control"/>
</div>
and do this on the CSS
.form-group{
float:Left;
}
JSfiddle link
For Bootstrap3 you can do something like this
<form name="someForm" method="post" action="/someAction.do" class="form-horizontal">
<div class="form-group">
<div class="col-xs-20">
<div cass="form-inline">
<label for="startDate" class="col-xs-2 control-label">From</label>
<div class="col-xs-2">
<input type="text" name="startDate" value="" readonly="readonly" id="startDate" style="width: 70px;" class="form-control" placeholder="From">
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="col-xs-20">
<div class="form-inline">
<label for="endDate" class="col-xs-2 control-label">To</label>
<div class="col-xs-2">
<input type="text" name="endDate" value="" readonly="readonly" id="endDate" style="width: 70px;" class="form-control" placeholder="To">
</div>
</div>
</div>
</div>
</form>
See Online example
You can find more examples at Twitter Bootstrap Forms tutorial.