Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Shelob9
Created January 27, 2017 15:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Shelob9/26141bfbee4ab7ef76006667be4e1c06 to your computer and use it in GitHub Desktop.
Save Shelob9/26141bfbee4ab7ef76006667be4e1c06 to your computer and use it in GitHub Desktop.
Get all data from a form after validation See https://calderaforms.com/doc/caldera_forms_submit_post_process/
<?php
add_action( 'caldera_forms_submit_post_process', function( $form ){
//put form field data into an array $data
$data= array();
foreach( $form[ 'fields' ] as $field_id => $field){
$data[ $field[ 'slug' ] ] = Caldera_Forms::get_field_data( $field_id, $form );
}
//Now you can do something with $data!
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment