cforms plugin function “my_cforms_logic” (for writing custom logic), is running 5 times

When it runs, check the $setting argument thats passed to the function.

my_cforms_logic gets called on several different hooks, some of which run almost simultaneously.

###
### Your custom application logic features
###
### "successMessage"    $cformsdata = cforms datablock
### "redirection"       $cformsdata = cforms datablock
### "filename"          $cformsdata = $_REQUEST
### "adminTO"           $cformsdata = cforms datablock
### "nextForm"          $cformsdata = cforms datablock
###
### "adminEmailTXT"     $cformsdata = cforms datablock
### "adminEmailHTML"    $cformsdata = cforms datablock
### "autoConfTXT"       $cformsdata = cforms datablock
### "autoConfHTML"      $cformsdata = cforms datablock
###

If you only want to run your custom function at one of these hooks, say “successMessage”, then start your function off like this:

function my_cforms_logic($cformsdata,$oldvalue,$setting) {

    if ('successMessage' != $setting) return $oldvalue;

        // now, do your custom logic
        // [. . . ]

}

Its interesting, I was just figuring that out the other day.

error code: 523