Get Field Value

The get_field() function used in form & actions hooks allows to retrieve the fields input that are entered by the user during the form submission. In order to retrieve the field value from the database, you must set a valid post ID reference.

functionOutput
get_field('my_field')“my_field” Input value
get_field('my_field', 128)“my_field” DB value

Get Action Output

The acfe_form_get_action() function can be used in form & actions hook to retrieve a previous action output. This function is useful to use a previous action data within the current action.

functionOutput
acfe_form_get_action()Get the latest action output
acfe_form_get_actions()Get all actions output
acfe_form_get_action('email')Get the latest “E-mail” action output
acfe_form_get_action('post')Get the latest “Post” action output
acfe_form_get_action('term')Get the latest “Term” action output
acfe_form_get_action('user')Get the latest “User” action output
acfe_form_get_action('my-action')Get the action named “my-action” output

Is Form Success

The acfe_is_form_success() can be used to check if the current page is a Form Success Page. This helper can be useful to display a custom success message or in a multi-step setup. Usage example:

// Success Message
if(acfe_is_form_success('my-form')){

    echo '<h3>Thank you</h3>';
    echo '<p>The form has been successfully submitted.</p>';
    
// Render Form
}else{

    acfe_form(array(
        'name' => 'my-form'
    ));

}