Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time

Success Management

Each Output Workflow is able to process its own success workflow.

image

Simple Text

If you're adding a text type, the form is just returning the text value you could use for a output. "Thank you for your message" for example.

Snippet

A Snippet could be useful if you need more output structure. FormBuilder will render the snippet and return its html data.

Redirect to Document

Use a document to get its path to perform a redirect for example.

Flash Messages on Redirect

If you're using Document as a success handler you're able to define a flash message.

To define a flash message you need to fill out the Flash Message below.


Flash Messages Implementation

Be sure you have included the twig template somewhere on top in your main layout:

{% include '@FormBuilder/Common/redirect_flash_message.html.twig' %}

Javascript Example

This is how your javascript listener could look like:

$('form.ajax-form').on('formbuilder.success', 
    function (ev, message, redirect, $form) {
        if (redirect) {
             document.location.href = redirect;
        } else {
            alert(message[0]['message']);
        }
    }
);