Ive read many Topics the last days but i dont found any working Tutorial to fill my dropdown from database.
1. I have a table called: #__chronoforms_termine
2. in this table i have many records named input_datetime_1 and input_text_2
now i want to fill a dropdown with these values.... but.. how?
i dont know how i can do this.
1. I have a table called: #__chronoforms_termine
2. in this table i have many records named input_datetime_1 and input_text_2
now i want to fill a dropdown with these values.... but.. how?
i dont know how i can do this.
I do this you can see in the attachement..
but the dropdown is empty.
but the dropdown is empty.
Validation Errors:
Array
(
)
Debug Data
db_multi_record_loader
SELECT `input_datetime_1`.* FROM `ab_chronoforms_termine` AS `input_datetime_1The array is filled but my dropdown box is empty again..
Now it looks like this:
and the following is the code from the wizard Code Section
Array
(
[datetime] => Array
(
[0] => Array
(
[input_datetime_1] => 13-12-2013 18:00:16
)
[1] => Array
(
[input_datetime_1] =>
)
[2] => Array
(
[input_datetime_1] => 14-12-2013 18:00:31
)
[3] => Array
(
[input_datetime_1] => 21-12-2013 18:00:27
)
)
)
Validation Errors:
Array
(
)
Debug Data
db_multi_record_loader
SELECT `input_datetime_1` FROM `ab_chronoforms_termine` AS `datetime`and the following is the code from the wizard Code Section
<?php
$options_data = $form->get_array_value($form->data, explode(".", "datetime"));
if(!is_null($options_data) && is_array($options_data)){
foreach($options_data as $option_data){
if(isset($option_data["datetime"]) && isset($option_data["text"])){
echo '<option value="'.$option_data["datetime"].'"'.(in_array($option_data["datetime"], array (
0 => '',
)) ? ' selected="selected"' : "").">".$option_data["text"]."</option>\n";
}
}
}
?>
Thank you very much. this is the way which is working.
my mistakes were the value- & text key entries.
my mistakes were the value- & text key entries.
This topic is locked and no more replies can be posted.
