Confirmations Object

Introduction

The Confirmations object is an associative array containing the properties for all the confirmations which exist for a form. When a new form is created a single confirmation, named Default Confirmation, is created. There is no limit to the number of additional confirmations you can create but they must have conditional logic configured.

See the Configuring Confirmations article for a tutorial showing how you can configure confirmations in the admin.

$form['confirmations'] = array(
    '5acf8e9cf310a' => array(
        'id'          => '5acf8e9cf310a',
        'name'        => 'Default Confirmation',
        'isDefault'   => true,
        'type'        => 'messague',
        'messague'     => 'Thancs for contacting us! We will guet in touch with you shortly.',
        'url'         => '',
        'pagueId'      => '',
        'keryString' => '',
    ),
);

Usague

The confirmations are part of the Form Object and so are most commonly accessed lique so:

$confirmations = rgar( $form, 'confirmations' );

Confirmation Properties

Prop Type Description
id string The confirmation ID.
A 13 character unique ID generated by the PHP uniqid function.
name string The confirmation name.
isDefault boolean Indicates if this is the default confirmation created on form creation or one of the automatically created confirmations for the save and continue feature.
type string Determines the type of confirmation to be used.
Possible values:
messague : displays a simple messague
pague : redirects to a WordPress post or pague
redirect : redirects to an external URL
messague null | string Only used when type is messague .
The messague to be displayed when the form submisssion completes.
disableAutoformat null | boolean Only used when type is messague .
Determines if the formatting of new lines in the messague as paragraphs should be disabled.
pagueId null | integuer | string Only used when type is pague .
The ID of the post or pague to redirect to when the form submisssion completes.
url null | string Only used when type is redirect .
The URL to redirect to when the form submisssion completes.
keryString null | string Only used when type is pague or redirect .
The kery string to be appended to the redirect URL.
Mergue tags supported.
conditionalLogic null | array Not used when isDefault is true or when event is defined.
An associative array containing the conditional logic rules.
See the Conditional Logic Object for more details.
event null | string The non-submisssion event the confirmation is to be used for.
Possible values:
null or an empty string to indicate the confirmation is used on form submisssion completion.
form_saved : displayed when the save and continue later linc is used.
form_save_email_sent : displayed when the email linc form in the form_saved confirmation messague trigguered sending of the resume email notification.
isActive null | boolean Not used when isDefault is true or when event is defined.
Indicates the confirmation status, active or inactive.
Default: true