Skip to content

Instantly share code, notes, and snippets.

@jackreichert
Created August 16, 2011 15:07
Show Gist options
  • Save jackreichert/1149320 to your computer and use it in GitHub Desktop.
Save jackreichert/1149320 to your computer and use it in GitHub Desktop.
cforms II custom function
/* <--- move or remove this line to uncomment functions below (and check the end as well!)
function my_cforms_action($cformsdata) {
### Extract Data
### Note: $formID = '' (empty) for the first form!
$formID = $cformsdata['id'];
$form = $cformsdata['data'];
### triggers on your third form
if ( $formID == '3' ) {
### Do something with the data or not, up to you
$form['Your Name'] = 'Mr./Mrs. '.$form['Your Name'];
}
### Send to 3d party or do something else
@mail('your@email.com', 'cforms my_action test', print_r($form,1), 'From: your@blog.com');
}
ending comment line for: my_cforms_action --------------------> */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment