Skip to content

Instantly share code, notes, and snippets.

@brianleejackson
Created December 28, 2022 17:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brianleejackson/4052a17203b14d19ff0511ba4d6bdd80 to your computer and use it in GitHub Desktop.
Save brianleejackson/4052a17203b14d19ff0511ba4d6bdd80 to your computer and use it in GitHub Desktop.
Remove additional line breaks in Fluent Forms WordPress plugin
add_filter('fluentform_response_render_textarea', function ($value, $field, $formId, $isHtml) {
if (false != strpos($value, '<br />')) {
$value = str_replace('<br />', '', $value);
}
return '<span style="white-space: pre-line">' . $value . '</span>';
}, 15, 4);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment