Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save spivurno/82fe0327b144a5209315be8ee358ef27 to your computer and use it in GitHub Desktop.
Save spivurno/82fe0327b144a5209315be8ee358ef27 to your computer and use it in GitHub Desktop.
<?php
/**
* Gravity Perks // Populate Anything // Add Line Break Between Live Merge Tag Checkbox Values
* https://gravitywiz.com/documentation/gravity-forms-populate-anything/
*/
// Update "123" with your form ID and "4" with your Checkbox field ID.
add_filter( 'gppa_live_merge_tag_value_123_4', function( $value, $merge_tag, $form, $field_id, $entry_values ) {
$values = array_map( 'trim', explode( ',', $value ) );
return implode( '<br>', $values );
}, 10, 5 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment