<div class="card-body">
<form action="" >
<div class="row">
<div class="col-5">
<label for="">From Date</label>
<input type="date" class="form-control" name="from" id="from" value="{{old('from')}}" required>
</div>
<div class="col-5">
<label for="">To Date</label>
<input type="date" class="form-control" name="to" id="to" value="{{old('to')}}" required>
</div>
<div class="col2 pt-4 mt-2">
<input type="submit" class="btn btn-success" value="search">
</div>
</div>
</form>
</div>
I want my from data after submission. i am using get request to search data and refresh the page with new data with from date fields with old search data
As I understood you want to show new data on your page while the from and to are from your previous request ?
Then why are you not returning the to and from with new data.
<input type="date"
class="form-control"
name="from"
id="from"
value= #if($from) "{{$from}}" #endif required>
<input type="date"
class="form-control"
name="to"
id="to"
value= #if($to) "{{$to}}" #endif required>
from controller return data that you want to return after applying the filters with the to and from
Related
when I submit this form, after entering some data, Gmail pops up but nothing is entered in it. What should I do so that the data I enter in the form gets entered in the email?
<form class="" action="mailto:exampl#gmail.com" method="post">
<div class="mb-3">
<label for="exampleFormControlInput1" class="form-label">Email address</label>
<input type="email" class="form-control" id="exampleFormControlInput1" placeholder="name#example.com">
</div>
<div class="mb-3">
<label for="exampleFormControlTextarea1" class="form-label">Example textarea</label>
<textarea class="form-control" id="exampleFormControlTextarea1" rows="3"></textarea>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
You need to add the name attribute to each field, which will appear in the mail's body. It'll format itself as mail={your_message} and so on.
Your code becomes:
<form class="" action="mailto:exampl#gmail.com" method="post" enctype="text/plain">
<div class="mb-3">
<label for="exampleFormControlInput1" class="form-label">Email address</label>
<input type="email" class="form-control" id="exampleFormControlInput1" placeholder="name#example.com" name="email">
</div>
<div class="mb-3">
<label for="exampleFormControlTextarea1" class="form-label">Example textarea</label>
<textarea class="form-control" id="exampleFormControlTextarea1" rows="3" name="message"></textarea>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
JSFiddle
I am developing my own website/application but I have a display problem on a title.
The web browser edge is in foreground and hide my title (Please, look at the picture with red rectangle to understand). The source code is bellow. I am doing something wrong ? I am using Bootstrap. Should I add CSS ?
<body>
<div id="divformulaire">
<h3>HERE IS MY PROBLEM:</h3>
<form method="post" action="requetes/creerMission.php" role="form" id="formulaire">
<hr/>
<input class="form-control" id="nothing1" name="nothing1" type="text" placeholder="Nothing" required>
<hr/>
<input class="form-control" id="nothing2" name="nothing2" type="text" placeholder="Nothing" required>
<hr/>
<input class="form-control" id="nothing3" type="number" name="nothing3" placeholder="Nothing" required>
<hr/>
<input class="form-control" id="nothing4" type="text" name="nothing4" placeholder="Nothing" required>
<hr/>
<input class="form-control" id="nothing5" type="text" name="nothing5" placeholder="Nothing" required>
<hr/>
<input class="form-control" id="nothing6" type="number" name="nothing6" placeholder="Nothing" required>
<hr/>
<span class="label label-default">Nothing</span>
<select class="form-control form-control-sm" id="nothing7" type="text" name="nothing7">
<option>Non</option>
<option>Oui</option>
</select>
<hr/>
<div class="form-group">
<label for="annonce">Nothing</label>
<textarea class="form-control" id="nothing8" name="nothing8" rows="3"></textarea>
</div>
<button class="btn btn-lg btn-primary btn-block" id="create" type="submit">Nothing</button>
</form>
</div>
</body>
Title problem
Your problem is that your div with the id of #divformulaire doesn't have any margin on the top. If you want the title to always be visible, you need to offset the entire div by roughly the amount of the browser topbar, where the URL is.
#divformulaire {
margin-top: 50px}
<body>
<div id="divformulaire">
<h3>HERE IS MY PROBLEM:</h3>
<form method="post" action="requetes/creerMission.php" role="form" id="formulaire">
<hr/>
<input class="form-control" id="nothing1" name="nothing1" type="text" placeholder="Nothing" required>
<hr/>
<input class="form-control" id="nothing2" name="nothing2" type="text" placeholder="Nothing" required>
<hr/>
<input class="form-control" id="nothing3" type="number" name="nothing3" placeholder="Nothing" required>
<hr/>
<input class="form-control" id="nothing4" type="text" name="nothing4" placeholder="Nothing" required>
<hr/>
<input class="form-control" id="nothing5" type="text" name="nothing5" placeholder="Nothing" required>
<hr/>
<input class="form-control" id="nothing6" type="number" name="nothing6" placeholder="Nothing" required>
<hr/>
<span class="label label-default">Nothing</span>
<select class="form-control form-control-sm" id="nothing7" type="text" name="nothing7">
<option>Non</option>
<option>Oui</option>
</select>
<hr/>
<div class="form-group">
<label for="annonce">Nothing</label>
<textarea class="form-control" id="nothing8" name="nothing8" rows="3"></textarea>
</div>
<button class="btn btn-lg btn-primary btn-block" id="create" type="submit">Nothing</button>
</form>
</div>
</body>
<div class="container">
<h1>SignUp Form</h1>
<form>
<div class="form-group" >
<label for="name">Name</label>
<input type="text" class="form-control" [ngClass]="{'red-border':user.name.errors}" [(ngModel)]="user.name" [ngModelOptions]="{standalone: true}" id="name" required >
</div>
<div class="form-group">
<label for="pass">Password</label>
<input type="password" class="form-control" id="pass" [(ngModel)]="user.pass" [ngModelOptions]="{standalone: true}">
</div>
<div class="form-group">
<label for="cpass">Confirm Password</label>
<input type="password" class="form-control" id="cpass "required [(ngModel)]="user.cpass" [ngModelOptions]="{standalone: true}">
</div>
<div class="form-group">
<label for="dob">DOB</label>
<input type="date" class="form-control" id="dob" required [(ngModel)]="user.dob"[ngModelOptions]="{standalone: true}">
</div>
<div class="form-group">
<label for="email">Email</label>
<input type="email" class="form-control" id="email" required [(ngModel)]="user.email" [ngModelOptions]="{standalone: true}">
</div>
<div class="form-group">
<label for="contact">Contact</label>
<input type="text" class="form-control" id="contact" required [(ngModel)]="user.contact" [ngModelOptions]="{standalone: true}">
</div>
<button type="button" (click)="validateUser(user)" class="btn btn-success" >Submit</button>
</form>
</div>
I am new to angular 2, i had tried required property in input tag,but its not working. Also i want to change the color when input in wrong. I tried it but i don,t get it how to do it. Here is the code.
give name to your input field like name="name" and then try this user.name.errors.required instead of user.name.errors
Hello fellow developers,
I am trying to solve a problem I am having and can't seem to find the correct answer a possible link or explanation will be very helpful.
I want to add an ajax function on the email field once the email is entered the name, surname and email should be saved to the database without the submit button being pressed. So that a (complete your form) email can be send 2 hours later.
I am really new to ajax and already using parsley for front end verification
Would anybody be able to assist?
Regards
{{ csrf_field() }}
<div class="form-group">
<label for="`name" class="name">First Name:</label>
<input type="text" name="name" id="name" class="form-control" required=" "
data-parsley-minlength="6" data-parsley-trigger="blur">
</div>
<div class="form-group">
<label for="surname" class="surname">Surname:</label>
<input type="text" name="surname" id="surname" class="form-control"
required=" " data-parsley-minlength="6" data-parsley-trigger="blur">
</div>
<div class="form-group">
<label for="email" class="email">Email Address:</label>
<input type="text" name="email" id="email" class="form-control" required=" "
data-parsley-type="email" data-parsley-trigger="blur">
</div>
<div class="form-group">
<label for="`size" class="size">Size of company:</label>
<input type="text" name="size" id="size" class="form-control" required=" "
data-parsley-type="integer" data-parsley-trigger="blur">
</div>
<div class="form-group">
<label for="`income" class="income">Income:</label>
<input type="text" name="income" id="income" class="form-control" required="
" data-parsley-type="integer" data-parsley-trigger="blur">
</div>
<div class="form-group" style="padding-bottom: 10px">
<label>Position in Company:</label>
<select name="position" id="position" class="form-control" value=" {{
old('position') }}" required=" " data-parsley-trigger="blur">
#foreach(App\Http\Utilities\Position::all() as $position)
<option value="{{ $position }}">{{ $position }}</option>
#endforeach
</select>
</div>
<div class="form-group">
<textarea name="message" id="message" class="form-control" rows="4" data-
parsley-maxlength="1000" data-parsley-trigger="blur">Enter text here...
</textarea>
</div>
<div class="form-group">
<label for="path" class="path">Accept Terms and Conditions
<input type="checkbox" name="path" class="form-control" required=" " data-
parsley-trigger="blur"></label>
</div>
<div class="form-group">
<input type="file" class="form-control" name="cv" id="cv" data-parsley-
trigger="blur">
</div>
<button type="submit"class="btn btn-primary">Submit details</button>
I have a form where the user has to choose between two modes, with two individual sets of inputs. Some inputs are required.
<form>
<div class="form-group">
<label>This or that?</label>
<div class="controls">
<label class="radio-inline">
<input type="radio" name="thisthat" value="this">
This
</label>
<label class="radio-inline">
<input type="radio" name="thisthat" value="that" checked>
That
</label>
</div>
</div>
<div class="this"> <!-- hidden as the page loads -->
<div class="form-group">
<input type="text" class="form-control" required="" placeholder="Some of this" />
</div>
<div class="form-group">
<input type="text" class="form-control" required="" placeholder="Some more of this" />
</div>
<div class="form-group">
<input type="text" class="form-control" placeholder="This again" />
</div>
</div>
<div class="that">
<div class="form-group">
<input type="text" class="form-control" required="" placeholder="Some of that" />
</div>
<div class="form-group">
<input type="text" class="form-control" required="" placeholder="Some more of that" />
</div>
<div class="form-group">
<input type="text" class="form-control" placeholder="That again" />
</div>
</div>
<button class="btn btn-info" type="submit">Submit</button>
</form>
Example on CodePen
When the user fills out one part of the form the submit is prevented because of the empty fields in the other part.
How can I disable the validation for the fields in the hidden part? Preferably without removing the required properties of the hidden inputs.
Is there a default way to do this?