third party plugin in form - display order

skittle 10 Mar, 2014
I have successfully tested a third party Joomla plugin inside a Chronoform - it works fine.

I have added three fields with dropdowns to allow the user to select criteria which is then used to filter the output of the third party plugin. The only issue I have is that the three criteria fields display after (below) the third party plugin. I need to force the fields to appear before (above) the plugin.

At the moment I am using a Custom Code Event to hold the plugin information. I have tried to use a Custom Element (HTML/PHP) to hold the plugin information instead, but this just shows the literal {plugin information} as it was entered and does not display the actual plugin. However, it does allow for me to control the onscreen order.

Is there any way for me to get my Chronoform fields to display above/before the third party plugin that is embedded in my form?

As always, thank you for your help.

John
skittle 11 Mar, 2014
I have worked around this issue using CSS. I am still curious if there is another way to control the display order.

John
GreyHead 11 Mar, 2014
Hi skittle,

I would expect the Custom Element element to work. Are you displaying the form using the ChronoForms Plug-in in an article? That might cause a problem - changing the order of the plug-ins in the Joomla! plug-ins Manager should fix that?

Bob
skittle 11 Mar, 2014
Hi Bob,

Thanks for your response.

No I am not using the plugin in an article to display the form. I am calling the Chronoform directly from a Joomla menu.

After a little testing, I have found that the Custom Element will not display the Joomla third party plugin I am using (I have not tried running other plugins using the Custom Element yet so don't know if this is true for all plugins or just this plugin). The literal string {plugin} is what appears in the Custom Element on display of the form. I have found that when the same plugin string is entered into a Custom Code Event and the Mode is changed from Controller to View, the same behavior occurs (the literal plugin string is displayed instead of the plugin itself.) It looks like the successful display of this plugin in a Chronoform is dependent on when the plugin is loaded. It also seems to show that the Custom Element loads after the controller code (like the View mode). A Custom Code Event set to Controller Mode is the only way I have been able to display this plugin.

Thanks again,

John
GreyHead 11 Mar, 2014
Hi John,

Have you added the Joomla! Plug-ins action to the form On Load event? That's needed to have plug-ins run inside a form (though even then not all plug-ins are supported).

Bob
skittle 11 Mar, 2014
Thanks Bob,

Yes. I read some documentation on setting this up and the Joomla Plugin Action has been installed in my form's On Load Event since my first attempt at making this work.

I will try with some other plugins when I get a minute and see how they work.
This topic is locked and no more replies can be posted.