Forums

call a chronoform within other component in view.html.php

zest96 23 Jun, 2016
Hi Bob and Max,
I want to replace a hardcoded PhpMailer that collects $_SESSION items <span>{$prod->name}</span>... with a chronoform.
the hardcoded mailer is quite straightforward and readable and is loaded when the user clicks a button.

im familiar with CF but never used the SESSION TO DATA.
what is the general concept of doing that replacement?
how do i call a form within this view.html.php file?

should i use a SESSION TO DATA and a custom code foreach($_SESSION["cart"] as $prod ) in CF to distribute the data into fields?

thanks.
GreyHead 24 Jun, 2016
1 Likes
Hi zest96,

I don't really understand what you are asking?

You can use the Joomla! Session methods to get/set session info and thus include it into the form data
<?php
$jsession = \JFactory::getSession();
$jsession->set('param_name', $form->data['xxx']);
$form->data['yyy'] = $jsession->get('param_name', 'default_value');
?>

Bob
This topic is locked and no more replies can be posted.