Forums

Chronoforms in K2 article

schlogo 19 Jul, 2012
Hello

I need to integrate chronoforms in K2 articles and pull email address from the extended fields of the k2 articles.

In k2 templates, here s the code i use to extract extended fields

<?php 
$extrafieldsid = array();     
foreach($this->item->extra_fields as $itemid){         
$extrafieldsid[$itemid->id] = $itemid->value;     
}        
?>


and then to display the field i want

<?php echo $extrafieldsid[4];?>


Any idea on how i can get the $extrafieldsid[4] to be used in chronoforms ? I ve tried some things but the variables are not recognized

Thanks
GreyHead 19 Jul, 2012
Hi schlogo,

I know nothing at all about K2 but if you can put the value in the page somewhere, maybe in a <div> tag??? then you can use JavaScript in ChronoForms to read the value and put it into a form input.

Bob
schlogo 19 Jul, 2012
thanks for your answer, i am not sure i want to put the email address in a div , ill see what i can find

tks
GreyHead 19 Jul, 2012
Hi schlogo,

If you can pass enough info to let you run the DB Query from the ChronoForms On Submit event that would be OK.

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