Hi Friend,
You can easily rendere you admin form.php file(Edit/Add New Action File).
First Method ::
Renderer file:
Date.php
class [NameSpace]_[ModuleName]_Block_Adminhtml_Edit_Renderer_Date extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
{
public function render(Varien_Object $row) {
//Get render element value
$_elementvalue = $row->getValue();
//Your Code Here
return $_elementvalue;
}
}
in your form.php
$nextdate = $fieldset->addField('next_date', 'date',
array(
'name' => 'next_date',
'label' => 'Close Date',
'class' => 'required-entry validate-date validate-date-range date-range-custom_theme-from',
'required' => true,
'image' => $this->getSkinUrl('images/grid-cal.gif'),
'format' => 'YYYY-MM-dd',
//'value' => $array['next_date']
));
//Set your renderer file path here
$renderer = new [NameSpace]_[ModuleName]_Block_Adminhtml_Edit_Renderer_Date();
$nextdate->setRenderer($renderer);
Second Method ::
Renderer file:
Date.php
class [NameSpace]_[ModuleName]_Block_Adminhtml_Edit_Renderer_Date extends Varien_Data_Form_Element_Abstract
{
protected $_element;
public function getElementHtml(Varien_Object $row){
//Get render element value
$_elementvalue = $this->getValue();
//Your Code Here
return $_elementvalue;
}
}
in your form.php
//Set your renderer file path here
$fieldset->addType('date', '[NameSpace]_[ModuleName]_Block_Adminhtml_Edit_Renderer_Date');
$fieldset->addField('next_date', 'date',
array(
'name' => 'next_date',
'label' => 'Close Date',
'class' => 'required-entry validate-date validate-date-range date-range-custom_theme-from',
'required' => true,
'image' => $this->getSkinUrl('images/grid-cal.gif'),
'format' => 'YYYY-MM-dd',
//'value' => $array['next_date']
));
You can easily rendere you admin form.php file(Edit/Add New Action File).
First Method ::
Renderer file:
Date.php
class [NameSpace]_[ModuleName]_Block_Adminhtml_Edit_Renderer_Date extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
{
public function render(Varien_Object $row) {
//Get render element value
$_elementvalue = $row->getValue();
//Your Code Here
return $_elementvalue;
}
}
in your form.php
$nextdate = $fieldset->addField('next_date', 'date',
array(
'name' => 'next_date',
'label' => 'Close Date',
'class' => 'required-entry validate-date validate-date-range date-range-custom_theme-from',
'required' => true,
'image' => $this->getSkinUrl('images/grid-cal.gif'),
'format' => 'YYYY-MM-dd',
//'value' => $array['next_date']
));
//Set your renderer file path here
$renderer = new [NameSpace]_[ModuleName]_Block_Adminhtml_Edit_Renderer_Date();
$nextdate->setRenderer($renderer);
Second Method ::
Renderer file:
Date.php
class [NameSpace]_[ModuleName]_Block_Adminhtml_Edit_Renderer_Date extends Varien_Data_Form_Element_Abstract
{
protected $_element;
public function getElementHtml(Varien_Object $row){
//Get render element value
$_elementvalue = $this->getValue();
//Your Code Here
return $_elementvalue;
}
}
in your form.php
//Set your renderer file path here
$fieldset->addType('date', '[NameSpace]_[ModuleName]_Block_Adminhtml_Edit_Renderer_Date');
$fieldset->addField('next_date', 'date',
array(
'name' => 'next_date',
'label' => 'Close Date',
'class' => 'required-entry validate-date validate-date-range date-range-custom_theme-from',
'required' => true,
'image' => $this->getSkinUrl('images/grid-cal.gif'),
'format' => 'YYYY-MM-dd',
//'value' => $array['next_date']
));
This comment has been removed by the author.
ReplyDeletehttp://www.magestore.com/magento-2-affiliateplus.html
ReplyDeletehttp://www.magestore.com/magento-2-one-step-checkout-extension.html
http://www.magestore.com/magento-2-gift-card-extension.html
All are the best Magento 2 extensions in my opinion.
Magento barcode is the best
ReplyDeleteIdeas for B2B marketing and free retail trade publications uk are now available in Omnichannelgal blog
ReplyDeleteKeep track of inventory are now available in Lamar blog
Inventory Turnover Rate for Retail is in Omnichannelly blog
Read What can i sell online in australia in Magentdev blog
https://blog.magestore.com/magento-download/
ReplyDeletehttps://blog.magestore.com/aheadworks-partnership/