Here's my folder structure for my block:
Product
| - Form.php
Product.php
My product form is a Form Container which is supposed to launch the Form stored within Product -> Form.php
However, although Product.php
is loading fine, the Product -> Form.php
does not seem to be appearing. I have a simple form setup, with a simple field on there asking for a Product SKU. The Fieldset nor the form it's contained within are loading on the page.
<?php
/**
* Form for Warehouse Products.
* Loads individual items that make up the form itself.
*
* @author Dan Hanly
**/
class Company_Module_Block_Adminhtml_Warehouse_Edit_Product_Form extends Mage_Adminhtml_Block_Widget_Form
{
public $_id; // Identifier of the block
public $_title; // Title of the block
public $_form; // Varien_Data_Form
/**
* Init class
*/
public function __construct()
{
parent::__construct();
$this->_id = 'product_form';
$this->_title = $this->__('Product Information');
}
/**
* Setup form fields for inserts/updates
*
* @return Mage_Adminhtml_Block_Widget_Form
* @author Dan Hanly
*/
public function _prepareForm()
{
$model = Mage::registry('module_warehouse');
$request = $this->getRequest();
$this->_form = $this->createForm($this->getUrl('*/*/save', $this->getUrlParameters($request)));
$this->setForm($this->_form);
$fieldset = $this->_form->addFieldset('base_fieldset', array(
'legend' => $this->_title,
'class' => 'fieldset-wide',
));
if ($this->isEdit($request)) {
$fieldset->addField('id', 'hidden', array(
'name' => 'id',
));
}
$fieldset->addField('warehouse_id', 'hidden', array(
'name' => 'warehouse_id',
'value' => Mage::registry('module_warehouse')->getId()
));
$fieldset->addField('product_id', 'text', array(
'name' => 'product_id',
'label' => $this->__('Choose Product'),
'value' => $this->__('Choose Product'),
));
return parent::_prepareForm();
}
There's nothing relevant in the logs that would allude to this.
EDIT
I clarified my question to strip out parts that were irrelevant.