Module::filter_success_message( string $success_message, int $form_id )

Filters the success message for a completed form submission in the frontend.

Description

See also

Parameters

$success_message

(string) (Required) The success message.

$form_id

(int) (Required) Form ID.

Return

(string) The success message depending on the form setting.

Source

File: src/modules/form-settings/module.php

	protected function filter_success_message( $success_message, $form_id ) {
		$success_message = $this->get_form_option( $form_id, 'success_message', '' );
		if ( empty( $success_message ) ) {
			$success_message = $this->get_default_success_message();
		}

		return $success_message;
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.