Skip to content

Instantly share code, notes, and snippets.

@klhall1987
Last active February 23, 2016 18:04
Show Gist options
  • Save klhall1987/135bb7cf051ddccda227 to your computer and use it in GitHub Desktop.
Save klhall1987/135bb7cf051ddccda227 to your computer and use it in GitHub Desktop.
An example of using the ninja forms processing variable.
//Hook into ninja forms processing.
add_action( 'ninja_forms_post_process', 'ninja_forms_code', 9999 );
function ninja_forms_code(){
//Declare $ninja_forms_processing as a global variable.
global $ninja_forms_processing;
//Get an array of all user-submitted values:
$all_fields = $ninja_forms_processing->get_all_fields();
$text = $all_fields;
$var_str = var_export($text, true);
$var = "<?php\n\n\$text = $var_str;\n\n?>";
file_put_contents('rvenkat_output.php', $text);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment