hi all,
please help !!!!!
i have a form with mulitple selection box, i have follow all steps properly, but not getting email properly.
if i dont add "[]" in the select box name, i get email, but not multiple value.. if i use select box name with "[]" i get empty email ???? please let me know where im wrong.. im using version 2.0
below the form
------------
<select name="san[]" multiple size="5">
<option value="select1">select1</option>
<option value="select2">select2</option>
<option value="select3">select3</option>
<option value="select4">select4</option>
<option value="select5">select5</option>
</select>
---------
i have added a Arry name for this select box to get value in array.. and i have also added "On Submit code"
------------
<?php
if ( is_array($_POST[san]) ) {
$_POST[san] = implode(',', $_POST[san]);
}
?>
------------
and in email template i have added
---------
<p> Subject: {san} </p>
---------
and in the "Auto generated" tab, i have added this
-----------
<?php
global $database;
if ( is_array($_POST[san]) ) {
$_POST[san] = implode(',', $_POST[san]);
}
$database->setQuery( "INSERT INTO #__chronoforms_9 VALUES (
'' , '". date('Y-m-d')." - ".date("H:i:s")."' , '".$_POST[san]."');" );
if (!$database->query()) {
echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script>
";
}
?>
----------
i know solution is there, but really dont know where im doing wrong ?
please help me out
thanks in advance
san
please help !!!!!
i have a form with mulitple selection box, i have follow all steps properly, but not getting email properly.
if i dont add "[]" in the select box name, i get email, but not multiple value.. if i use select box name with "[]" i get empty email ???? please let me know where im wrong.. im using version 2.0
below the form
------------
<select name="san[]" multiple size="5">
<option value="select1">select1</option>
<option value="select2">select2</option>
<option value="select3">select3</option>
<option value="select4">select4</option>
<option value="select5">select5</option>
</select>
---------
i have added a Arry name for this select box to get value in array.. and i have also added "On Submit code"
------------
<?php
if ( is_array($_POST[san]) ) {
$_POST[san] = implode(',', $_POST[san]);
}
?>
------------
and in email template i have added
---------
<p> Subject: {san} </p>
---------
and in the "Auto generated" tab, i have added this
-----------
<?php
global $database;
if ( is_array($_POST[san]) ) {
$_POST[san] = implode(',', $_POST[san]);
}
$database->setQuery( "INSERT INTO #__chronoforms_9 VALUES (
'' , '". date('Y-m-d')." - ".date("H:i:s")."' , '".$_POST[san]."');" );
if (!$database->query()) {
echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script>
";
}
?>
----------
i know solution is there, but really dont know where im doing wrong ?
please help me out
thanks in advance
san