Jump to content
thirty bees forum

[request] html on blockcontactinfos


Recommended Posts


Really easy, in fact, it's already a HTML block for the address field, the field is a texarea, and you can extend the field by draging the coner. When saving, an "HTML clean filter" remove HTML tag. When displaying, another filter transform HTML tag in clean characters.

To remove these filters, 2 modify to add:

  1. in modules\blockcontactinfos\blockcontactinfos.php, line 72, replace the getContent() function by : (just add "true" paramater to say it's some html you what to save) public function getContent() { $html = ''; if (Tools::isSubmit('submitModule')) { foreach (Blockcontactinfos::$contact_fields as $field) Configuration::updateValue($field, Tools::getValue($field), true); $this->_clearCache('blockcontactinfos.tpl'); $html = $this->displayConfirmation($this->l('Configuration updated')); } }
  2. in themes\community-theme-default\modules\blockcontactinfos\blockcontactinfos.tpl, remove HTML filter with that: {$blockcontactinfos_address nofilter}

If you need more texarea for other fiels, just replace the type field in renderForm() by: 'type' => 'textarea',

Should works, Regards.

Link to comment
Share on other sites

Hi, For the first one, he add nl2br filter, just transform the \n in
. Like he explained, it's should working, except if you add some HTML. In the case you add some HTML tags, you have to specify 'nofilter' for not transforning HTML Tags.

Second link, it's the same.


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...