Skip to content

Instantly share code, notes, and snippets.

@wpn
Created January 16, 2014 17:21
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/5de92798ee72c5f3cd8a to your computer and use it in GitHub Desktop.
Save wpn/5de92798ee72c5f3cd8a to your computer and use it in GitHub Desktop.
$ninja_forms_processing
<?php
function ninja_forms_code(){
//Declare $ninja_forms_processing as a global variable.
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 );
//Update the user submitted value for the field with an ID of 3.
$ninja_forms_processing->update_field_value( 3, 'New Field Value' );
//Get the form ID of the form being processed.
$form_id = $ninja_forms_processing->get_form_ID();
//Get an array of all user-submitted values:
$all_fields = $ninja_forms_processing->get_all_fields();
//$all_fields will be an array in the format of: array( 'field_id' => #, 'user_value' => 'Submitted Value' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment