Do you like AbanteCart? Please rate AbanteCart or share your experience with other eCommerce entrepreneurs. Go to Softaculous rating page to add your rating or write a review

Put the html form select option etc on tpl file

Started by yonghan, June 22, 2014, 01:14:18 AM

Previous topic - Next topic

yonghan

Hi,i would like to request to put the html select,input type component etc on the tpl file instead using html helper so that we can edit the styles directly without changing the controller.And the controller only pass the array,data etc instead of passing html component.Currently i saw that several input type was rendered via tpl file,several are rendered via controller.Thanks a lot.

abolabo

first of all check type of your form field variable inside tpl. For ex you have button $form['button_cancel']. If this is object you can change it's style via property style: $form['button_cancel']->style = 'your css pseudoclass';

In case when you have string varible you can redefine button with Ahtml class inside tpl. For ex: $this->html->buildElement( array('type' => 'button', 'name' => 'your button name', ....))
"No one is useless in this world who lightens the burdens of another."
― Charles Dickens

yonghan


Forum Rules Code of conduct
AbanteCart.com 2010 -