Convertigo Public Knowledge base

How to control Sequence response after submitting a form

After submitting form inputs data to a Convertigo Sequence, for example, you may want to check and warn the user if the process has succeeded or if it went wrong.

Under the Call_sequence component placed in the onSubmit event of your form, use the IfElse and doElse components to control the Sequence response and display a message to warn the user.

In the condition property of the IfElse component you can check for the presence or not of a certain key or value in the sequence’s response.

For example, to check there is no key ‘error’ in the response write the following:

!parent.out.error

If the condition returns true, all child components will be executed. A Toast component in our case.

In the doElse component, you can use an Alert component, in case there was an error.

You may have a look at the sample project here : https://github.com/convertigo/c8oprj-sample-form-submit Ready to import in your Convertigo Studio

(c) Convertigo 2023 https://www.convertigo.com