Creating a new payment form
To create a new payment form:
- Login to your Cognito Forms account.
- Select the dropdown arrow next to the New Form button on your organization’s Dashboard. From here, you can create a new form from scratch, or choose a pre-built template.
- Some templates already have payment fields: Basic Food Order Form, Basic Sales Form, Catering Deposit, Donation, Membership Dues and Parking Ticket Payment.
Adding payment to an existing form
After logging into Cognito Forms, click the name of the existing form you want to collect payment from. You can choose from one of four field types to collect payment:
The currency of your form’s Payment fields will be determined by the location settings of your form and/or organization. If you have more than one field on your form that is collecting payment, the amounts from each field will be added together and used for the subtotal.
Hidden payment fields (set to Internal or Never view) still contribute to the order total on a payment form.
Let’s say you want to sell boxes of cookies online. You could set up a Choice field with all your cookie varieties, then a Number field where users can enter the number of boxes they’d like to purchase (let’s call that field ‘How many boxes?’).
First, you’ll need to assign prices to each cookie variety:
Next, find the Specify Quantity option in your Choice field settings, and select the ‘How many boxes?’ field. Now, the product price will automatically be multiplied by the specified quantity. You can also put these fields into a repeating section to allow users to order multiple boxes of different varieties of cookies — like 3 chocolate chip, 4 peanut butter and 2 oatmeal raisin.
Setting a minimum purchase amount
To require a minimum purchase amount on your order form:
Add a Calculation field toward the bottom of your form labelled ‘Final Total’. Set the field type to Currency.
Create a calculation to generate the subtotal. You will need to add up all the payments fields on your form (ex:
=PaymentField1 + PaymentField2 + PaymentField3). If your payments fields are inside a repeating section, you can use the Sum function to generate the total (ex:
Select the Custom Error option, and set an error to appear when the total price is less than the minimum purchase amount (ex: $10):
Make sure to include a custom error message (ex: “Order total must be at least $10.”).
Save your form.
Check out our pre-built template to see this calculation in action!