Component integration

rigo 04 Jun, 2009
Hi,

I've just created a MVC Component.
How do I integrate a CForm into my views/tmpl/default.php?

I'm using PHP 5.2, MySql 5, Joomle 1.5.10

Best regards
rigo
Max_admin 05 Jun, 2009
Hi rigo,

install Chronoforms and add these lines at the top of your component/file code:


require_once( JPATH_COMPONENT.DS.'libraries'.DS.'chronoform.php');
require_once( JPATH_COMPONENT.DS.'libraries'.DS.'mails.php');
require_once( JPATH_COMPONENT.DS.'libraries'.DS.'customcode.php');
require_once( JPATH_COMPONENT.DS.'libraries'.DS.'chronoformuploads.php');
require_once( JPATH_COMPONENT.DS.'libraries'.DS.'plugins.php');


replace JPATH_COMPONENT by JPATH_SITE.DS.'components'.DS.'com_chronocontact'

then call it like
$MyForm =& CFChronoForm::getInstance($formname);


you need to set a form name though!

Cheers
Max
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.