I have a form that I would like a user to fill out with some basic information. However, before submitting the info, I want to include a button I am using to activate Stripe to request payment.
I have tried this so far, however, this button before the submission button is acting as the submit button.
Here is some code:
{{ Form::open(array('route' => 'fans.store')) }}
{{ Form::label('name', 'Name:') }}
{{ Form::text('name', null, array(
'class' => 'input',
));}}
{{ Form::label('email', 'Email:') }}
{{ Form::text('email', null, array(
'class' => 'input',
));}}
<div class="button_row">
<button id="customButton" class="button">Purchase</button>
</div>
<div class="button_row">
{{Form::submit('Submit', ['class' => 'button'])}}
</div>
{{Form::close()}}
Any work arounds? The syntax is blade php (I'm using Laravel 4). Thank you.
Try the following:
{{ Form::button('purchase', 'Purchase with Stripe', array( 'id' => 'purchase', 'onclick'=>'myFunction()')) }}
That creates a purchase button,
myFunction()
that launches stripeCollected from the Internet
Please contact [email protected] to delete if infringement.
Comments