Submit button does not work in html5 - html

I have the following submit button that does not take me to search.php. Please guide me what is wrong with it.
<div class="row" style="margin-top:80px;">
<form class="form-signin" id="Form1" action="search.php" method="post">
<div class=" col-xs-12" style="float:left;display:inline;">
<div class="ui-widget">
<label for="city">City: </label>
<input id="city">
</div>
<button type="button" class="btn btn-default" type="submit">Search</button>
</div>
</form>
</div>

<button type="button" .... type="submit">Search</button>
You have defined type twice. Remove the one you don't want.

Related

Submit button does not pass form data

Here is my code:
<form class="form-horizontal" action="/abc" method="POST">
<div><input type="text" id="name" value="a"></div>
<div class="border-top row">
<button type="submit" class="btn float-right" name="update">Update
</button>
</div>
</form>
When I click button it just pass data like below:
update:
Why is it not showing other form data?
You should add name attribute to the input field to get the value of text-box on click of submit button.
<form class="form-horizontal" action="/abc" method="POST">
<div><input type="text" id="name" value="a" name="uname"></div>
<div class="border-top row">
<button type="submit" class="btn float-right" name="update">Update
</button>
</div>
</form>

Bootstrap form action submit issue

Iam new to bootstrap and I am trying to add an action="doform.php" to a form but I cant get it to work, where in this code should I add action?
<form class="form-inline">
<div class="form-group">
<button type="submit" class="btn btn-default">Send invitation</button>
</div>
<div class="form-group">
<button type="submit" class="btn btn-default">Send invitation</button>
</div>
I have tried the following but it doesnt do anything...
<form class="form-inline">
<div class="form-group">
<form id="back" action="doit1.php" method="post">
<button type="submit" class="btn btn-default">Send invitation</button>
</form>
</div>
<div class="form-group">
<form id="back" action="doit1.php" method="post">
<button type="submit" class="btn btn-default">Send invitation</button>
</form>
</div>
</form>
Inside the form tag.
And don't forget the method. I assume you'll want to use POST
<form action="doAction.php" method="POST">
Oh, and you only need one submit button.

Placing a checkbox in an input addon bootstrap

I am trying to place a checkbox within an input group addon whilst using a bootstrap 3 form.
The checkbox is to show password on a sign in form.
<form class="form-signin">
<h1 class="form-signin-heading" align="center"><strong>Owner Gateway</strong></h1>
<input type="text" class="form-control" placeholder="Username" required autofocus></input>
<div class="wrapper">
<div class="input-group" style="width: 100%">
<input type="text" class="form-control" placeholder="Password"/>
<span class="input-group-addon">Show</span>
</div>
</div>
<button class="btn btn-lg btn-primary btn-block" type="submit">Log in</button>
<button class="btn btn-lg btn-primary btn-block" id="new-btn" type="submit">Stay Logged in</button>
</div>
</form>
If anyone could help, I would be very grateful.
<div class="input-group" style="width: 100%">
<input type="text" class="form-control" placeholder="Password"/>
<span class="input-group-addon"><input type="checkbox"> Show</span>
</div>
Just try simply that.

Aligning text box and button, bootstrap

I've had the following issue occur with a bootstrap-styled text field and input button many times. Notice that they are not vertically aligned:
How do I align these two elements? Here is the HTML:
<div class="span6">
<input type="text" placeholder="email"> <button type="button" class="btn btn-info">Sign up</button>
</div>
In order to complete that, you must use proper Twitter Bootstrap classes for forms.
In this case, that is .form-inline class.
Here is proper markup:
<form class="form-inline">
<input type="text" class="input-small" placeholder="Email"/>
<button type="submit" class="btn">Sign in</button>
</form>
Here is demo http://jsfiddle.net/YpXvT/42/
<div class="navbar-form pull-left">
<input type="text" class="span2">
<button class="btn">Sign up</button>
</div>
copied from http://twitter.github.io/bootstrap/components.html#navbar
or
<div class="input-append">
<input type="text"/>
<button class="btn">Sign up</button>
</div>
or
<div class="form-horizontal">
<input type="text"/>
<button class="btn">Sign up</button>
</div>
<div class="input-group">
<input type="email" class="form-control" required="required" placeholder="monEmail#domaine.fr">
<span class="input-group-btn">
<button class="btn btn-default" type="submit"><i class="fa fa-send"></i></button>
</span>
</div>
change css for class input-group-btn in boostrap-min: vertical-align =>top
it s work for me

How to both Prepend+Append to a search-query?

Hi while using twitter bootstrap i have come up with this issue, i can't both prepend+append buttons to an input with the class="search-query".
I can however, do this:
<form class="form-search">
<div class="input-append">
<input type="text" class="span2 search-query">
<button type="submit" class="btn">Search</button>
</div>
<div class="input-prepend">
<button type="submit" class="btn">Search</button>
<input type="text" class="span2 search-query">
</div>
</form>
but if i try to put both classes together it doesn't work.
Any suggestions?
Thanks, and Regards.
Based on the code from Bootstrap's Documentation, worth a look.
<div class="input-prepend input-append">
<div class="btn-group">
<button class="btn">
Search
</button>
</div>
<input class="span2" type="text">
<div class="btn-group">
<button class="btn">
Search
</button>
</div>
</div>