Forum

Thread tagged as: Problem, Forms, PayPal

Using Perch PayPal Shop within Perch Form

Hi guys,

I'm trying to get a PayPal form to submit to the forms app in perch AND carry the user through to PayPal to pay for a product.

I can get each of these things working individually, but as soon as I combine them, they fail - none of the PayPal form fields receive any values. Is this because I'm calling the form through Perch_Form()?

Please see the form below:

<perch:form name="Bookings" app="perch_forms perch_shop_paypal" id="_xclick" method="post" action="https://www.paypal.com/cgi-bin/webscr">

<perch:label for="Salutation">Salutation</perch:label>
<perch:input type="select" options="Mr,Mrs,Miss,Ms,Dr." id="Salutation" name="Salutation" />

<perch:label for="FirstName">First Name</perch:label>
<perch:input type="text" id="FirstName" name="FirstName" value="" size="40" style="width:250px;height:19px;" />

<perch:label for="LastName">Surname</perch:label>
<perch:input type="text" id="LastName" name="LastName" value="" size="40" style="width:250px;height:19px;" />

<perch:label for="Address1">Address</perch:label>
<perch:input type="text" id="Address1" name="Address1" value="" size="40" style="width:350px;height:19px;"><br><perch:input type="text" name="Address2" value="" size="40" style="width:350px;height:19px;" />

<perch:label for="Town">Town</perch:label>
<perch:input type="text" id="Town" name="Town" value="" size="40" style="width:250px;height:19px;" />

<perch:label for="County">County</perch:label>
<perch:input type="text" id="County" name="County" value="" size="40" style="width:250px;height:19px;" />

<perch:label for="PostCode">Post Code</perch:label>
<perch:input type="text" id="PostCode" name="PostCode" value="" size="40" style="width:100px;height:19px;" />

<perch:label for="Tel">Tel</perch:label>
<perch:input type="text" id="Tel" name="Tel" value="" size="40" style="width:250px;height:19px;" />

<perch:label for="Email">Email</perch:label>
<perch:input type="text" id="Email" name="Email" value="" size="40" style="width:350px;height:19px;" />



<br />Please tick below if you have a disability and outline any special requirements.<br />

<perch:label for="Disability">Disability</perch:label>
<perch:input type="checkbox" id="Disability" name="Disablity" value="1" />

<perch:label for="SpecialRequirements">Special Requirements</perch:label>
<perch:input type="text" id="SpecialRequirements" name="SpecialRequirements" value="" size="40" style="width:350px;height:19px;" />




<br />If you have been given a booking code please enter here, if not please leave blank.<br />

<perch:label for="BookingCode">Booking Code</td><td align="left" valign="top">
<perch:input type="text" id="BookingCode" name="BookingCode" value="" style="width:100px;height:19px;" /></td>

<td align="left" valign="top" bgcolor="#ffffff" colspan="2"><br><br></td>

<td align="left" valign="top">Terms Agreed</td><td align="left" valign="top">
<perch:input type="checkbox" id="TandC" name="TandC" value="1" />Tick here to confirm that you have read and agree to our <a href="https://www.activegloucestershire.org/tandc.asp" target="_blank">terms and conditions</a>.</td>

<td align="left" valign="top" bgcolor="#ffffff" colspan="2"><br>Please also note that an online booking fee of 5% will be added to the overall cost.<br></td>

<!---->
<perch:input type="hidden" name="business" value="<perch:setting id="perch_shop_paypal_email" />" />
        <perch:input type="hidden" name="currency_code" value="GBP" /> 
        <perch:input type="hidden" name="cmd" value="_cart" />
        <perch:input type="hidden" name="add" value="1" />     
        <perch:input type="hidden" name="item_name" value="<perch:shop id="productTitle" />" />
        <perch:input type="hidden" name="item_number" value="<perch:shop id="productCode" />" />
        <perch:input type="hidden" name="amount" value="<perch:shop id="productPrice" />" />

        <perch:if exists="productOptions_html"><perch:shop id="productOptions_html" encode="false" type="hidden" /></perch:if>
<!---->

<div class="buttons"><perch:input type="submit" name="add" value="Add to cart" />  <span class="price">Price: &pound;<perch:shop id="productPrice" /></span></div>

<perch:success>
Successful.
</perch:success>
</tbody></table>
</perch:form>

None of the perch:shop fields are being populated.

The form is being called this way:

perch_form('booking.html');

Any ideas?

Thanks, Harry

Harry Ray

Harry Ray 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Is this the same as your other post?