Submitting a form

In this example, we demonstrate how to submit a form using the OneEntry API.

โœ… Purpose of the scenario:
  • Get form configuration from OneEntry Platform
  • Collect user input data from a contact form.
  • Ensure data is correctly formatted and validated before submission.
  • Submit the collected data to an OneEntry API.
โœ… What you need:
  • A valid PROJECT_URL and APP_TOKEN for authentication with the OneEntry API.
  • A pre-configured form in OneEntry identified by a marker (e.g., 'contact_us').
  • A pre-configured form fields.
๐Ÿ“Œ Important:
  • Handle potential errors during API requests gracefully to provide feedback to users.
  • Maintain data privacy and security, especially when handling sensitive information like email addresses.
  • Keep the form fields and their markers in sync with the backend configuration to avoid mismatches.
  • These examples do not include error handling.
  • You can manage errors using a try-catch block or by employing a construction like await Promise.catch((error) => error).
๐Ÿ“š See in documentation:
๐Ÿ“ฆ SDK reference:
Loading sandboxโ€ฆ