form_data,
esc_html__( 'Send To Email Address', 'wpforms-lite' ),
[
'default' => '{admin_email}',
'tooltip' => esc_html__( 'Enter the email address to receive form entry notifications. For multiple notifications, separate email addresses with a comma.', 'wpforms-lite' ),
'smarttags' => [
'type' => 'fields',
'fields' => 'email',
],
'parent' => 'settings',
'subsection' => $id,
'class' => 'email-recipient',
]
);
if ( $cc ) :
wpforms_panel_field(
'text',
'notifications',
'carboncopy',
$settings->form_data,
esc_html__( 'CC', 'wpforms-lite' ),
[
'smarttags' => [
'type' => 'fields',
'fields' => 'email',
],
'parent' => 'settings',
'subsection' => $id,
]
);
endif;
wpforms_panel_field(
'text',
'notifications',
'subject',
$settings->form_data,
esc_html__( 'Email Subject Line', 'wpforms-lite' ),
[
'default' => sprintf( /* translators: %s - form name. */
esc_html__( 'New Entry: %s', 'wpforms-lite' ),
$settings->form->post_title
),
'smarttags' => [
'type' => 'all',
],
'parent' => 'settings',
'subsection' => $id,
]
);
wpforms_panel_field(
'text',
'notifications',
'sender_name',
$settings->form_data,
esc_html__( 'From Name', 'wpforms-lite' ),
// phpcs:disable WPForms.PHP.ValidateHooks.InvalidHookName
/**
* Allow modifying the "From Name" field settings in the builder on Settings > Notifications panel.
*
* @since 1.7.6
*
* @param array $args Field settings.
* @param array $form_data Form data.
* @param int $id Notification ID.
*/
apply_filters(
'wpforms_builder_notifications_sender_name_settings',
[
'default' => $from_name,
'smarttags' => [
'type' => 'fields',
'fields' => 'name,text',
],
'parent' => 'settings',
'subsection' => $id,
'readonly' => ! empty( $from_name_after ),
'after' => ! empty( $from_name_after ) ? '
' . $from_name_after . '
' : '',
'class' => ! empty( $from_name_after ) ? 'wpforms-panel-field-warnings' : '',
],
$settings->form_data,
$id
)
// phpcs:enable WPForms.PHP.ValidateHooks.InvalidHookName
);
wpforms_panel_field(
'text',
'notifications',
'sender_address',
$settings->form_data,
esc_html__( 'From Email', 'wpforms-lite' ),
// phpcs:disable WPForms.PHP.ValidateHooks.InvalidHookName
/**
* Allow modifying the "From Email" field settings in the builder on Settings > Notifications panel.
*
* @since 1.7.6
*
* @param array $args Field settings.
* @param array $form_data Form data.
* @param int $id Notification ID.
*/
apply_filters(
'wpforms_builder_notifications_sender_address_settings',
[
'default' => $from_email,
'smarttags' => [
'type' => 'fields',
'fields' => 'email',
],
'parent' => 'settings',
'subsection' => $id,
],
$settings->form_data,
$id
)
// phpcs:enable WPForms.PHP.ValidateHooks.InvalidHookName
);
wpforms_panel_field(
'text',
'notifications',
'replyto',
$settings->form_data,
esc_html__( 'Reply-To', 'wpforms-lite' ),
[
'tooltip' => esc_html(
sprintf( /* translators: %s -
. */
__( 'Enter the email address or email address with recipient\'s name in "First Last %s" format.', 'wpforms-lite' ),
// is a zero-width space character. Without it, Tooltipster thinks it's an HTML tag
// and closes it at the end of the string, hiding everything after this value.
'<email@example.com>'
)
),
'smarttags' => [
'type' => 'fields',
'fields' => 'email,name',
],
'parent' => 'settings',
'subsection' => $id,
]
);
wpforms_panel_field(
'textarea',
'notifications',
'message',
$settings->form_data,
esc_html__( 'Email Message', 'wpforms-lite' ),
[
'rows' => 6,
'default' => '{all_fields}',
'smarttags' => [
'type' => 'all',
],
'parent' => 'settings',
'subsection' => $id,
'class' => 'email-msg',
'after' => '' .
sprintf(
/* translators: %s - {all_fields} Smart Tag. */
esc_html__( 'To display all form fields, use the %s Smart Tag.', 'wpforms-lite' ),
'{all_fields}
'
) .
'
',
]
);
/**
* Fires immediately after notification block on lite version.
*
* @since 1.7.7
*
* @param array $settings Current confirmation data.
* @param int $id Notification id.
*/
do_action( 'wpforms_lite_form_settings_notifications_block_content_after', $settings, $id );
?>