Form: submit, validate and reset controls
Group named controls into a native form and choose when to submit or reset them.
Group named controls into a native form and choose when to submit or reset them.
Before you begin
Section titled “Before you begin”- An App Connect page and an endpoint whose request fields and JSON response shape you know. Use a development endpoint for write examples.
Choose native navigation or a JSON form
Section titled “Choose native navigation or a JSON form”A plain App Connect Form validates and submits a native browser form, which can navigate to the response. Choose Server Connect Form or API Form when the page should receive JSON and remain in place. Styling a form with Bootstrap does not change this submission behavior.
Configure the native request
Section titled “Configure the native request”Give the form an ID for page actions. Set Method to GET for a query-string read or POST for a body submission, and Action to the destination. Every submitted control needs the expected name; its id serves a different purpose. Put a submit button inside the form and avoid nested forms.
Use the normal validation path
Section titled “Use the normal validation path”Submit validates unless No Validate is enabled, then dispatches the cancelable Submit event before native submission. If validation fails, Invalid fires and the first invalid control is focused. Direct skips validation and the Submit event; use the normal path for user-entered data. Reset restores initial control values and resets validation UI; it does not reverse a server action.
Example: search with a shareable URL
Section titled “Example: search with a shareable URL”Create a GET form with Action /search and an input named q. Add a submit button, type Notebook and submit. The browser navigates to a URL containing q=Notebook. The destination must implement that search. If you want to update an existing result list in place, use a data source Load action instead.
Keep validation on the server too
Section titled “Keep validation on the server too”Browser validation helps the user correct a form. It does not establish trust in submitted fields, authenticate a user or prevent a separately crafted request. Validate the same required values at the endpoint.
Continue with the matching workflow
Section titled “Continue with the matching workflow”Use the related guide to build and check the surrounding page workflow.
Check your result
Section titled “Check your result”You can configure the request, bind its real output and distinguish a successful result from loading, validation and error states.