I have currently used a short code to change the notification labels from default to red for a client and now I’m trying to figure out how to change the notification text in the label to white. Attached is a picture of where I’m at any help would be appreciated it! Screenshot 2024-02-21 at 9.52.49 AM|690x290
Hello. There is no filter to change that specifically. But you can filter the email before it is sent, and find/replace the text color using the gform_pre_send_email filter. Example 5 here shows finding and changing the font-size:
You will do something similar for the font color of the label text:
add_filter( 'gform_pre_send_email', 'customize_notification_email', 10, 4 );
function customize_notification_email( $email, $message_format, $notification, $entry ) {
// Apply only to HTML notifications
if ( $message_format == 'html' ) {
// Find and replace the specified string with the modified version
$email['message'] = str_replace(
'font-size:12px;"><strong>',
'font-size:12px; color:#fff;"><strong>',
$email['message']
);
}
return $email;
}
Test that out and let us know if it works for you. Thank you.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.