ChronoEngine.com homepage

Forums

Please write a review for the extension you are using on the Joomla extensions directory before posting a new question as we are being spammed by many negative reviews.

Thank you for your support!

Execute chronoform after K2

ByBus 28 Nov, 2017
I use sessions to transfer parameters from K2 to Chronoforms 6. But K2 is executed later than Chronoforms and therefore the variables are passed empty. (plugins ordering - Chronoforms is the last plugin - doesn't help). At first visit the page, CFs textfields are empty. And they are fills after refresh of the page. I think it's becouse of order. How to make chronoform's execution after k2?

I use shortcode {chronoforms6}myform{/chronoforms6} in K2 item.
Max_admin 29 Nov, 2017
Hi ByBus,

What kind of variables you are trying to access ?

Best regards
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
ByBus 29 Nov, 2017
I want to get variables from extrafields:

in item.php:
<?php
    $session = JFactory::getSession();
    $session->set("articul",  $this->item->extraFields->articul->value);
    $session->set("nametxt",  $this->item->extraFields->dostoinstva->value);
    $session->set("tsena",  $this->item->extraFields->tsena->value);    
 ?> 

in chronoforms php block:
$session = JFactory::getSession();
   $art = $session->get("articul");
   $dostoin = $session->get("nametxt");
   $ts = $session->get("tsena");
   $this->data['prjname'] = $art.' - '.$dostoin.' - '.$ts.'руб';
Max_admin 29 Nov, 2017
What happens when you use
echo $art;
After the code ? does it return the art value inside the form ?
You could also set the values in the $_POST

Best regards
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
ByBus 29 Nov, 2017
I've placed echo $art; in CF
$session = JFactory::getSession();
$art = $session->get("articul");
$dostoin = $session->get("nametxt");
$ts = $session->get("tsena");
$this->data['prjname'] = $art.' - '.$dostoin.' - '.$ts.'руб';
echo $art;

result:
[IMG]https://cdn1.savepice.ru/uploads/2017/11/29/ecdd3a2ef32013715cd0393cbc891a3c-full.jpg[/IMG]
[IMG]https://cdn1.savepice.ru/uploads/2017/11/29/b0c001cf0db556ad3674e08f50e5af20-full.jpg[/IMG]

After pressing F5 all is ok:
[IMG]https://cdn1.savepice.ru/uploads/2017/11/29/6a7e732b76b57b5d557713d409879223-full.jpg[/IMG]
[IMG]https://cdn1.savepice.ru/uploads/2017/11/29/fcd2bcd3ffd222c931ec1bb325a5874b-full.jpg[/IMG]
ByBus 29 Nov, 2017
M100 is $art
Could you explain how to do this with POST
Trying to make like this:
in k2
JFactory::getApplication()->input->set('vari', 'value');

in CF
echo JFactory::getApplication()->input->get('vari');

But vari is empty
This topic is locked and no more replies can be posted.

2Checkout.com

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com