Skip to main content

Result output

Result output allows displaying user-defined blocks after the form is submitted successfully.

Result output

Configuration

Follow these steps:

  1. Add a Result output item and keep its name in mind. Result outputs are found in the WordPress admin sidebar.
  2. Create a form
  3. Add the form to the desired page
  4. Add the Result output block to the same page
  5. In the Result output block options select the form and the Result output block you created in step 1
  6. (Optional) Disable the global messages in the form settings

Once the form is submitted the select block will be displayed.

Result output settings

Result output item block

Alongside the Result output block you will find the Result output item block. It allows changing parts of the result output or showing things like custom messages, based on user input.

Result output item block

Caution

The block will not show anything by default. Some configuration by developers is required. For more details, check the chapter on custom filters.

To configure the block, add it inside a Result output block, and provide a name, an operator and a value that will match the data provided by the filter. Once the form is submitted and the condition matches, the selected block will be shown.

Operators

The value doesn't have to match exactly — the block options include an Operator select, so the condition can be a comparison, a text check or a numeric range.

OperatorCondition is true when
isthe value is exactly the same as the provided value
is notthe value is different from the provided value
greater thanthe value is greater than the provided value
greater than or equalthe value is greater than or equal to the provided value
less thanthe value is less than the provided value
less than or equalthe value is less than or equal to the provided value
containsthe value contains the provided value
not containsthe value doesn't contain the provided value
starts withthe value starts with the provided value
ends withthe value ends with the provided value
in rangethe value is between the start and end value, excluding both
in range (including value)the value is between the start and end value, including both
not in rangethe value is outside the start and end value, excluding both
not in range (including value)the value is outside the start and end value, including both

The four range operators show an additional End value field, so the condition is checked against a startend interval. The other operators use a single Value field.

Note

All numeric operators — the comparisons and the ranges — cast both sides to a number. The is, is not, contains, not contains, starts with and ends with operators compare strings.

Caution

Provide both a name and a value. A Result output item without them is not rendered at all.

Multiple items can target the same name with different operators, so one value can drive several outputs — e.g. show one block for a score below 50 and another for a score in the 50 – 80 range.

Tip

Works great with the Computed Fields Add-on.

Result output part shortcode

Similar to the Result output item block, the shortcode version allows smaller, inline varations, e.g. simple pieces of text.

Result output part shortcode

Caution

The shortcode will not show anything by default. Some configuration by developers is required. For more details, check the chapter on custom filters.

To configure the shortocde, add it somewhere inside the Result output block. Provide a name and set the default text. Once the form is submitted, the shortcode is replaced with the value that matches the provided name, and the default text is kept if there is no matching value.

Note

Unlike the Result output item block, the shortcode has no operator — it always outputs the value for the matching name, it doesn't compare it.

Tip

Works great with the Computed Fields Add-on.