Skip to content

Instantly share code, notes, and snippets.

@zachskaggs
Last active August 29, 2015 14:05
Show Gist options
  • Save zachskaggs/81febf738f33080cdaa7 to your computer and use it in GitHub Desktop.
Save zachskaggs/81febf738f33080cdaa7 to your computer and use it in GitHub Desktop.
To replace checked/unchecked values in user emails to yes/no
<?php
function nf_change_user_email_value( $email ) {
$original = array('checked','unchecked')
$replace = array('yes','no')
return str_replace( $original, $replace, $email );
}
add_filter( 'ninja_forms_email_user_value', 'nf_change_user_email_value' );
@kstover
Copy link

kstover commented Aug 19, 2014

It looks like it might work, but you'll need to assign the str_replace() to $email before you return. Otherwise, you won't actually be modifying anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment