Hello. First, thanks for a great and versatile script.
I've run into a problem: I want to use conditional redirection, but it seems like I've entered the wrong id of the input or something. Here's my my-functions.php:
function my_cforms_logic($cformsdata,$oldvalue,$setting) {
if ( $setting == "redirection" ){
$userfield = $cformsdata['data'][$cformsdata['data']['$$$li--2']];
if ( $userfield == 'abc' )
return 'http://my.new.url.com';
if ( $userfield == 'def' )
return 'http://my.other.url.com';
}
return $oldvalue;
}
If I select abc in the dropdown, it just redirects to the default page, which is not I want to.
I found li–2 in the html source. If I remove "if ( $userfield == 'abc' )"
it redirects to new.url.com as it should. Can anyone give me a clue on what's wrong?
Thanks!