I have two forms
first_form
is for ajax request to load new input data which is displayed insecond_form
as input fields(this is already done)second_form
is to submit all data of its own andfirst_form
as well(this is not achieved)
first_form
is using form-inline
to display inputs horizontally while the other form is a normal form so i cannot combine both the forms.
So when user clicks submit button of the second_form
i want to send all its data along with the data of the first_form
as well.
Example:
<form id="first_form" class="form-inline">
<input type="text" />
<input type="text" />
<button type="submit" class="btn btn-primary">Load</button> // This loads fields for second form
</form>
<form id="second_form">
<div class="loaded_data"> // this div is loaded with ajax
<input type="text" />
<input type="text" />
<button type="submit" class="btn btn-primary">Save</button> // This must send all fields of first and second form
</div>
</form>
I do not want to use ajax for second form. The form will be submitted and store method of Laravel controller will be called for further processing