Form API

Form Options

These options are passed to the Dijon Javascript Form API using the form template function.

formOptions

The Javascript defaults you can override with the formOptions parameter to the form template function.

Name Description Default
formId The document selector for the form tag #dijon_form
amountSelector The document selector for the hidden amount input input[name=donation_amount]
finalAmountSelector The document selector for the hidden final amount input input[name=final_amount]
feeAmountSelector The document selector for the hidden fee amount input input[name=fee_amount]
typeSelector The document selector for the type of donation input input[name=type]:checked
validateFn You can specify a function to do custom validation of your form. Return true if you have validation errors or false if payment should proceed. By default the Form API calls a function that validates using fields in stripeElementsOptions creditCardValidationFields

On this page