Forums

Load form in php file

rlab 21 Aug, 2015
Hi,

I found this post: https://www.chronoengine.com/forums/posts/t99179/p344981.html which has code to load a chronoform5 in a php file.

I have a form named "miniContact" and have added this code into my php file:

	jimport('cegcore.joomla_gcloader');
	ob_start();
	$output = new JoomlaGCLoader('front', 'chronoforms5', 'chronoforms', array("chronoform" => "miniContact"), array('controller' => '', 'action' => ''));
	$return = ob_get_clean();
	echo $return;


What I am getting on the front of the website is: "Form name can NOT be empty!"
but as you can see I have put the form name into the array.

Any help on how to get this form to display would be great.

Thank you.
GreyHead 22 Aug, 2015
Hi rlab,

Sorry, I have no experience of that way of showing a form :-(

Is there some reason why you can’t use a template module here?

Bob
rlab 24 Aug, 2015
Hi,

I have a slideshow and I want to show the contact form on each slide in the slideshow. So, I need to place the form in the slide code. The slideshow is using a Bootstrap carousel which is called using php code.

Is there a way to load a module outside of a template file, in my slideshow php code? Using the template load module code didn't work.

Maybe Max knows how to do this as he suggested the code in the other post, but it doesn't seem to work.

Thank you.
GreyHead 24 Aug, 2015
Hi rlab,

No idea, sorry. What is the module that you are using?

You can try asking Max using the Contact Us menu above and linking to this thread.

Bob
Max_admin 27 Aug, 2015
That code should work, I'm not sure why it doesn't, can you run joomla plugins in your carousel ? if not then you may try a different carousel which does ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.