Disabling Form Submit Success Message

Is there a way to totally disable the Success Message when submitting a form? I tried leaving the success field empty but an empty green container still appears. And when doing a display:none on that container the submit button still gets a bottom margin applied to it which makes the whole form shift upwards.

It is a good question. I also want to disable the error notification and display both using interactions + popups.
This is easily possible using css, but it would be great if an option was added to disable form messages.

Use the filter bricks/form/response, located at themes > bricks > includes > integrations > form > init.php. You can filter any response message.

Tried this:

function remove_success_message($response) {
    if ($response['type'] === 'success') {
        $response['message'] = ''; 
    }
    return $response;
}
add_filter('bricks/form/response', 'remove_success_message');

But it only removes the text string and leaves the green container. I know I can just do a display:none but when the form is sent it applies a bottom margin on the submit button which messes up the layout.

But never mind, I found another workaround. But it would be nice to have an option to totally disable the success message since I always rather use a success popup. Thanks for the tip though :slight_smile:

I have different use case than you, I have to extend the Init Class and add own filter so i can selectively unset $errors that i want.