Hello,
I want to use $JSite::getMenu() in my form template (stored in the field "form code").
My first trys fails. Inside the formcode I try this:
But then I click on the Save-button I see a white page with the form until my <?php tag and nothing else. I can't see my mistake.
How can I use Joomla-framework classes / methods in my form template?
I want to use $JSite::getMenu() in my form template (stored in the field "form code").
My first trys fails. Inside the formcode I try this:
...<?php
jimport("joomla.application.application");
$menu = &JSite::getMenu();
?>...
But then I click on the Save-button I see a white page with the form until my <?php tag and nothing else. I can't see my mistake.
How can I use Joomla-framework classes / methods in my form template?
Hi Torty,
This works OK
You need the isSite() check to stop ChronoForms trying to evaluate the form code on save ( a faulty feature).
Bob
This works OK
<?php
if ( !$mainframe->isSite() ) return;
$menu =& JSite::getMenu();
print_r($menu);
?>
You need the isSite() check to stop ChronoForms trying to evaluate the form code on save ( a faulty feature).
Bob
This topic is locked and no more replies can be posted.