Please replace the ??? with your data!
- URL to the FORM: http://???
- The browser used: IE FF
- cforms version: 8.52
- Your Wordpress version: 2.6
[desc]:
i got an error today morning when i was using custom input field option in core form admin. The problem is this: i defined a field called "confirm password" in a cform, then when i see the source code of the page including that form, i saw this
<input name="confirm-password" id="confirm-password"….>
So this confirm-password is not a legal variable name if i try to post this form data to third party. so it took me a while to work out how to solve this problem. then i found the following code in cform plugin.
### input field names & label
if ( get_option('cforms'.$no.'_customnames')=='1' ){
…
} else
$input_id = $input_name = cf_sanitize_ids($field_name);
} else
$input_id = $input_name = 'cf'.$no.'_field_'.$i;
### sanitize label ID's
function cf_sanitize_ids($string) {
if ( function_exists('sanitize_title_with_dashes') )
return sanitize_title_with_dashes($string);
else
return str_replace(' ','_',$string);
}
as we can see at the last couple lines, it calls the 'sanitize_title_with_dashes' method which provided by wordpress in formatting.php. from the name of this method we just know that this will replace ' ' with '-'. so here is the problem.
i have not figured out the best way to solve this problem. here i just want to point this out, and cforms guys may help me or do some changes?