Skip to content

Instantly share code, notes, and snippets.

@wpn
Created January 16, 2014 18:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wpn/4f409e7916b70d5766d0 to your computer and use it in GitHub Desktop.
Save wpn/4f409e7916b70d5766d0 to your computer and use it in GitHub Desktop.
ninja_forms_pre_process
<?php
function ninja_forms_register_example(){
add_action( 'ninja_forms_pre_process', 'ninja_forms_example' );
}
add_action( 'init', 'ninja_forms_register_example' );
function ninja_forms_example(){
global $ninja_forms_processing;
//Get the user submitted value for the field with an ID of 3.
$user_value = $ninja_forms_processing->get_field_value( 3 );
//Add the text Hello World to the user value.
$user_value .= "Hello World";
//Update the user submitted value for the field with an ID of 3:
$ninja_forms_processing->update_field_value( 3, $user_value );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment