daily pastebin goal
8%
SHARE
TWEET

Untitled

a guest Jan 15th, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $sub = Ninja_Forms()->form( $form_id )->sub()->get();
  2.  
  3. foreach($fields as $field_id => $field_value){
  4.     $sub->update_field_value( $field_id, $field_value );
  5. }
  6.  
  7. $sub->save();
  8.    
  9. $sub_id = Ninja_Forms()->subs()->create( $form_id );
  10.  
  11. foreach( $form_fields as $field_id => $value ) {
  12.  
  13.     Ninja_Forms()->sub( $sub_id )->add_field( $field_id, $value );
  14. }
  15.    
  16. $form_fields = array(
  17.  
  18.     $fiel_id_1 => $value_1,
  19.     $fiel_id_2 => $value_2,
  20.     ...
  21.  
  22. );
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top