sedero
(sedero)
August 19, 2026, 1:48pm
1
After the update on august 6th the emails using {{all_fields}} have too much padding on top and bottom .
i’ve tried adding the filter below, but this does not work.
Anyone any idea on how to change the padding for the rows using {{all_fields}} ?
add_filter( 'gform_pre_send_email', function( $email ) {
$email['message'] = str_replace('padding: 8px 16px;', 'padding: 2px 10px', $email['message'] );
return $email;
}, 10, 1);
the row causing the padding was:
inside the common.php
tried replacing it using the filter, which did not work. for now i have changed the values in common.php, but the next update will revert my changes. so i would like to know if there is a filter that works.
richardw8k
(Richard Wawrzyniak (Gravity Forms))
August 19, 2026, 1:53pm
2
See the following topic for an alternative solution:
Hey Tim,
Welcome to the Gravity Forms community!
I don’t think there is a way to roll back the formatting without rolling back the entire plugin, so I’d like to suggest another solution that will actually give you permanent control over the formatting of the {all_fields} merge tag.
That is the free All Fields Template . It needs a little bit of setup, but the docs give a pre-made template that could fix your issue.
If you decide to take it for a spin, let me know how it goes (and if you have …
The filter you tried works with a little tweaking:
add_filter( 'gform_pre_send_email', function( $email, $message_format, $notification, $entry ) {
if ( 'html' !== $message_format ) {
return $email;
}
$email['message'] = preg_replace(
'/padding:\s*8px\s+16px/i',
'padding: 8px',
$email['message']
);
$email['message'] = preg_replace(
'/padding:\s*16px/i',
'padding: 8px',
$email['message']
);
return $email;
}, 10, 4 );
HappyDays
(Happydays)
September 9, 2026, 3:31pm
4
Thank you for this code @unboxinteractive !