CF4, Joomla 1.5.25
My problem is that I prepared a select box, which shows the record from some table (not CF) and put the code of it in the "DB Multi Record Loader" "Custom Code" in my form. Besides this box I also have some others for users to fill. And now my form saves the other items in a table that was created by CF, but does't saves this one from the select box. So please help me either to create the proper code, or to put the events in the right order.
And the problem is also that the data from the select box does't appear in the mail, byt anyway I need all the information submited in this form to be in one database
I attach some screenshots.
this is the code in custom html event:
<div class="form_item">
<div class="form_element cf_dropdown">
<label class="cf_label" style="width: 150px;">
Wybieram kurs</label>
<select class="cf_inputbox validate-selection"
id="kurs" size="1" name="kurs">
<option value=''>ABC Mądrego Życia - termin ustalany indywidualnie z chętnymi</option>
<option value=''>Mój Sukces - termin ustalany indywidualnie z chętnymi</option>
<option value=''>Nasz Sukces - termin ustalany indywidualnie z chętnymi</option>
<?php
if (!$mainframe->isSite() ) {return;}
$db =& JFactory::getDBO();
$query = "
SELECT `id`, `title`, `dates`
FROM `jos_eventlist_events`
WHERE `catsid` = 2
AND `published` = 1
ORDER BY `title`;
";
$db->setQuery($query);
$options = $db->loadAssocList();
foreach ( $options as $o ) {
echo "<option value='".$o[id]."'>".$o[title]." - ".$o[dates]."</option>";
}
?>
</select>
</div>
<div class="cfclear"> </div>
</div>
my events:
[attachment=0]2011-11-18_events.png[/attachment]
this is the list from debugger. I did somethig and now have double array, how to come back?
Data Array:
Array
(
[inny_termin] =>
[name] => aa
[email] => [email]aridel@interia.pl[/email]
[input_textarea_7] =>
[input_hidden_11] =>
[input_submit_3] => Submit
[857d2008bcbbfd78983f6968d051521c] => 1
[chronoform] => zapisy2
[event] => submit
[format] => html
[Itemid] => 159
[option] => com_chronoforms
[chronoform_data] => Array
(
[cf_uid] => 2052c5621b7a3946275cd850369983fb
[cf_created] => 2011-11-18 17:06:00
[cf_ipaddress] => 127.0.0.1
[cf_user_id] => 0
[inny_termin] =>
[name] => aa
[email] => [email]aridel@interia.pl[/email]
[input_textarea_7] =>
[input_hidden_11] =>
[input_submit_3] => Submit
[857d2008bcbbfd78983f6968d051521c] => 1
[chronoform] => zapisy2
[event] => submit
[format] => html
[Itemid] => 159
[option] => com_chronoforms
[cf_id] => 6
)
[chronoform_data_cf_id] => 6
)
dzięki
Debug Data
An email has been SENT successfully from (testowa-jaA)admin@amz.org.pl to [email]aridel@interia.pl[/email]
Email template:
zapisano na kurs
Wybieram kurs {kurs}
Inny termin kursu
Imię i nazwisko aa
Email [email]aridel@interia.pl[/email]
Inna forma kontaktu
Submitted by 127.0.0.1
redirect_user
redirect_user_target_url: http://localhost/amz/szkolenia/harmonogram-kursow.html
Redirect URL (click to continue):
http://localhost/amz/szkolenia/harmonogram-kursow.html
I know, sorry to put few problems in one post but I think thay are all connected.
Kind regards to the cf crew.
Please help.