Submit a FormSubmission. Offline submissions will be added to a pending queue
and be processed using the processPendingQueue() function. FormSubmissions
with payment submission events will return the FormSubmissionResult with a
payment property set, this should be used to redirect the user to the
payment URL. Will also handle cleaning up auto save data (if the
autoSaveKey property is passed), locally stored drafts and prefill data.
if (submissionResult.scheduling) { // Redirect user to booking form window.location.href = submissionResult.scheduling.bookingUrl return }
if (submissionResult.payment) { // Redirect user to payment form window.location.href = submissionResult.payment.hostedFormUrl return }
if (submissionResult.isOffline) { if (submissionResult.isInPendingQueue) { // Display message to user that the submission // has been added to the pending queue } else { // Display message to user that this submission can // not be processed while offline (most likely because it requires a payment) } return }
// submissionResult.submissionId and submissionResult.submissionTimestamp // will be set if the submission was successful
Submit a FormSubmission. Offline submissions will be added to a pending queue and be processed using the
processPendingQueue()function. FormSubmissions with payment submission events will return the FormSubmissionResult with apaymentproperty set, this should be used to redirect the user to the payment URL. Will also handle cleaning up auto save data (if theautoSaveKeyproperty is passed), locally stored drafts and prefill data.Example