Hi,
Please help me with this problem when trying to send the email template with a multiple selected items in a <select> field.
I get this error:
(censored some directory names and IP)
Here's the form code:
Here's the auto generated code:
I have no onsubmit() code at all.
Email template consists of this:
The whole thing was created using the wizard. An email is sent but it just has the IP. I can actually have this error removed by adding another ] to the name field in the HTML - ie:
But still nothing is printed in the email. Any ideas what's going on? I've tried a million different combinations and I've searched all over these forums for a solution. Some posts have found this error but that was for previous versions so i don't know how to fix it.
----- 3 hours pass ------
Okay I've just removed 3.0 and installed the previous stable version and that seems to work fine. But I'll still post this topic so you guys are aware of the issue🙂
Please help me with this problem when trying to send the email template with a multiple selected items in a <select> field.
I get this error:
_POST: Array ( [select_0] => Array ( [0] => option 1 [1] => option 2 [2] => option 3 ) [undefined] => Submit )
Use template
Warning: preg_replace() [function.preg-replace]: Compilation failed: missing terminating ] for character class at offset 14 in /home/blah/public_html/subdomains/blah/components/com_chronocontact/chronocontact.php on line 407
Email sent
E-mail message
From: tf3 [blah@gmail.com]
To: blah@gmail.com
Subject: tf3t
Submitted by 123.123.123.123
(censored some directory names and IP)
Here's the form code:
<div class="form_item"><div class="form_element cf_dropdown"><label class="cf_label">Click Me to Edit</label><select multiple="multiple" class="cf_inputbox" id="select_0" size="3" name="select_0[]"><option value="option 1">option 1</option><option value="option 2">option 2</option><option value="option 3">option 3</option><option value=" option 4"> option 4</option><option value=" option 5"> option 5</option><option value=" option 6"> option 6</option></select></div><div class="clear"> </div></div><div class="form_item"><div class="form_element cf_button"><input value="Submit" name="undefined" type="submit"></div><div class="clear"> </div></div>
Here's the auto generated code:
<?php
$database =& JFactory::getDBO();
srand((double)microtime()*10000);
$inum = "I" . substr(base64_encode(md5(rand())), 0, 16);
$_POST['select_0'] = implode(',', $_POST['select_0']);
$database->setQuery( "INSERT INTO #__chronoforms_6 VALUES (
'' , '".$inum."','". date('Y-m-d')." - ".date("H:i:s")."', '".$_SERVER['REMOTE_ADDR']."' , '".JRequest::getVar('select_0','', 'post', 'string', '' )."' , '".JRequest::getVar('undefined','', 'post', 'string', '' )."');" );
if (!$database->query()) {
echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script>
";
}
?>
I have no onsubmit() code at all.
Email template consists of this:
Click Me to Edit{select_0[]}
The whole thing was created using the wizard. An email is sent but it just has the IP. I can actually have this error removed by adding another ] to the name field in the HTML - ie:
<select multiple="multiple" class="cf_inputbox" id="select_0" size="3" name="select_0[]]">
But still nothing is printed in the email. Any ideas what's going on? I've tried a million different combinations and I've searched all over these forums for a solution. Some posts have found this error but that was for previous versions so i don't know how to fix it.
----- 3 hours pass ------
Okay I've just removed 3.0 and installed the previous stable version and that seems to work fine. But I'll still post this topic so you guys are aware of the issue🙂
Thanks so much for letting us know, I will look into this, the V3 is beta and so it may has this glitches!
Best regards,
Max
Best regards,
Max
I am also facing same problem the code is as follows:
As in previous post i see to remove the V3.0 and revert back to last V2.5 RC3.1 , although i tried three Versions V3.0 Beta, V3.0 Stable, V2.5 but my problem didnt get resolved.
under fieldnames value is selectProdouts and in database form table also named selectProducts........ i data didnt get entered in the table..
M i doing something wrong...?
Please HELP :?
<select name="selectProdouts[]" multiselect> <option>...........</option>
As in previous post i see to remove the V3.0 and revert back to last V2.5 RC3.1 , although i tried three Versions V3.0 Beta, V3.0 Stable, V2.5 but my problem didnt get resolved.
under fieldnames value is selectProdouts and in database form table also named selectProducts........ i data didnt get entered in the table..
M i doing something wrong...?
Please HELP :?
Hi navdeep,
'multiselect' isn't valid html - please try this instead
I'm not sure if that's the problem but it might be.
Bob
'multiselect' isn't valid html - please try this instead
<select name="selectProdouts[]" multiple="multiple">
I'm not sure if that's the problem but it might be.
Bob
Hi navdeep, and also test with V3.0 stable, let me know what happens after you test Bob's code with the V3.0 stable!
Cheers
Max
Cheers
Max
This topic is locked and no more replies can be posted.