mardi 18 juillet 2017

How to send input form data to controller without submitting the form?

I want to use the response data from a SOAP-service to fill in missing info, before submitting the form. I cannot use a form within a form, so how should I send the data to my controller?

{!! Form::open(['route' => 'relations.store']) !!}
{!! Form::text('company_id', null, ['class' => 'form-control']) !!}
{!! Form::submit(trans('labels.lookup'), ['class' => 'btn btn-primary']) !!}

{!! Form::submit(trans('labels.save'), ['class' => 'btn btn-primary']) !!}
{!! Form::close() !!}

So when a user clicks on the lookup button, other input fields should be filled in with the data of the SOAP-response. The only missing element in my script is getting the company_id input to my controller without submitting the form.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2tCf4qw
via IFTTT

Aucun commentaire:

Enregistrer un commentaire