Recent Topics

1 Sep 14, 2012 15:34    

My b2evolution Version: 3.x

I am wanting to use html in a custom field. I've changed the
inc/items/views/_item_expert.form.php and
inc/collections/views/_coll_features.form.php
so that it uses a textarea instead of just a text field... but am getting html stripped out when I save. Is there any way to use html in these fields?

Thanks in advance!

2 Sep 16, 2012 20:22

HTML is not allowed in custom fields for security reasons. I like the idea of having HTML in varchar fields too.
Anyway, you need to hack the core.
In /inc/collections/model/_blog.class.php line 548
replace

$this->set_setting( 'custom_varchar'.$i, param( 'custom_varchar'.$i, 'string', NULL ) );


with

$this->set_setting( 'custom_varchar'.$i, param( 'custom_varchar'.$i, 'html', NULL ) );

Remember to transfer the changes after upgrade

3 Sep 18, 2012 02:20

Hmmm, tried that, and the html still gets stripped out.

4 Sep 18, 2012 02:27

See if at least it's saved in the database evo_coll_settings

5 Sep 18, 2012 03:06

The custom field is definitely there, and it does save text - but no html. I'm trying to add a hyperlink in the field, and the text of the link saves, but not the <a href etc.


Form is loading...