Skip to content

Instantly share code, notes, and snippets.

@phillipwilhelm
Created September 6, 2016 19:28
Show Gist options
  • Save phillipwilhelm/f2ea99b9a78b2adb1fb2f31910debede to your computer and use it in GitHub Desktop.
Save phillipwilhelm/f2ea99b9a78b2adb1fb2f31910debede to your computer and use it in GitHub Desktop.
<?php
// CREDIT: http://pastebin.com/4J7z8y2X
// allow HTML in a specific form field
// update the '344' to the ID of your form
add_filter( 'gform_allowable_tags_344', 'hearts_welcome_here', 10, 2 );
function hearts_welcome_here( $allow_html, $field ) {
// update the '2' to the ID of your field
if( $field['id'] == 2 )
return true;
return $allow_html;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment