Breezingforms lite for Joomla! 3.x - Summary element not working when populating data from database

298 views Asked by At

I already asked this question in the crosstec forum (https://crosstec.org/en/forums/15-usage/110095-summarize-page-for-form-elemente-with-php-content.html) but unfortunately got no answer yet. And I spent a lot of time for searching the internet for any hint but didn't find anything.

I am working on a form where theater tickets can be reserved, and therefore the user has to select a date from a list of dates. These dates I am reading out from the database by using following code to the BEFORE FORM :

global $datelist;
$this->execPieceByName('ff_InitLib');
$strquery = "SELECT * FROM auffuehrungstermin";
$rows = ff_select( $strquery );
$datelist="";
if (Count($rows))
{
  foreach($rows as $record)
  {
     $timestring = $record->Termin;
     $timedata = strtotime($timestring);
     $strdate = date("l, d. F Y", $timedata);
     $datelist .= "0;$strdate;\n";
  }
}

Then in the radio button list I added following php code (instead adding the values directly there):

<?php
global $datelist;
return $datelist;
?>

This works fine. the dates from database are displayed correctly. But I have a summary page on the next page and there the summary element for the radio button list does not work (the message for "nothing selected" is displayed).

I tried to store the selected value by myself by adding a validation script to the radio button list but this script is not executed at all.

How can I get the selected value of a radio button list where the data is read out from the database?

Thanks for your help!

0

There are 0 answers