Menu

Form View

by admin, 02/11/2015

[insert_php]
$args = array(
’21’ => $form_id,
‘user_id’ => $user_id,
‘fields’ => array(
’89’ => ‘checked’,
),
);
// This will return an array of sub objects.
$subs = Ninja_Forms()->subs()->get( $args );
// This is a basic example of how to interact with the returned objects.
// See other documentation for all the methods and properties of the submission object.
foreach ( $subs as $sub ) {
$form_id = $sub->form_id;
// Returns an array of [field_id] => [user_value] pairs
$all_fields = $sub->get_all_fields();
// Echoes out the submitted value for a field
echo $sub->get_field( 89 );
}
[/insert_php]