Last active
August 29, 2015 14:05
-
-
Save zachskaggs/81febf738f33080cdaa7 to your computer and use it in GitHub Desktop.
To replace checked/unchecked values in user emails to yes/no
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.