Hi guys,
Chronoforms V5 works fine as a shopping cart system: I've created a component with a list of seminars. Every entry is a form and if you click the Submit-Button, you'll be taken to the Chronoforms-form on another page, where the productnumber is saved in a session-array:
(Form code view)
This way one can choose several seminars and they all appear as a list in the Chronoforms form. Unfortunately I don't know how to delete a certain value of this session array in case someone chose the wrong seminar by providing a »DELETE«Button or something similar. Is it possible to delete those values without reloading the page (with Ajax for example)?
Thanks, Timo
Chronoforms V5 works fine as a shopping cart system: I've created a component with a list of seminars. Every entry is a form and if you click the Submit-Button, you'll be taken to the Chronoforms-form on another page, where the productnumber is saved in a session-array:
(Form code view)
$form->data['numbers'][] = $_POST['seminarnummer'];
$session = JFactory::getSession();
$cf_numbers = $session->get('cf_numbers',array());
$cf_numbers = array_merge($cf_numbers,$form->data['numbers']);
$session->set('cf_numbers',$cf_numbers);
$nummern = $session->get('cf_numbers',array());
$trimnummern = array_filter($nummern);
$uniquenummern = array_unique($trimnummern);
$implodenummern = implode('","',$uniquenummern);
$terminanzahl = count($uniquenummern);
This way one can choose several seminars and they all appear as a list in the Chronoforms form. Unfortunately I don't know how to delete a certain value of this session array in case someone chose the wrong seminar by providing a »DELETE«Button or something similar. Is it possible to delete those values without reloading the page (with Ajax for example)?
Thanks, Timo
This topic is locked and no more replies can be posted.
