Skip to content

Instantly share code, notes, and snippets.

@e06widu
Created May 20, 2013 13:21
Show Gist options
  • Select an option

  • Save e06widu/5612192 to your computer and use it in GitHub Desktop.

Select an option

Save e06widu/5612192 to your computer and use it in GitHub Desktop.
<?php
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// Include dependancy of the main model form
jimport('joomla.application.component.modelform');
// import Joomla modelitem library
jimport('joomla.application.component.modelitem');
// Include dependancy of the dispatcher
jimport('joomla.event.dispatcher');
/**
* HelloWorld Model
*/
class MyResourceListModeljoinwithus extends JModelForm
{
/**
* @var object item
*/
protected $item;
/**
* Get the data for a new qualification
*/
public function getForm($data = array(), $loadData = true)
{
$app = JFactory::getApplication('site');
// Get the form.
$form = $this->loadForm('com_myresourcelist.joinwithus', 'joinwithus', array('control' => 'jform', 'load_data' => true),true);
if (empty($form)) {
return false;
}
return $form;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment