Search

For my truncated textarea I extended the normal textarea field, giving it more functionality. The downside of this is that everywhere I had the old textarea, I have to replace it with the new Truncated Textarea.

Is it possible to extend a default field to be more powerful, without having to make core changes (in this case, editing the original textare field itself), or add a new field?

Is it possible to extend a default field to be more powerful, without having to make core changes (in this case, editing the original textare field itself), or add a new field?

Nope, the way to extend (add additional functionality to) a core field is to extend it (in the object-oriented sense) and create a brand new field.

To replace the existing field, so long as your field uses the same database structure as the original, you can manually change the type column in sym_fields to use your new field type. This will save you having to remove and add fields, thereby retaining existing content.

Ok, that was what I thought. Couldn’t really think of any other way ;)

To replace the existing field, so long as your field uses the same database structure as the original, you can manually change the type column in sym_fields to use your new field type. This will save you having to remove and add fields, thereby retaining existing content.

I will look into this in the next version of the plugin. My structure is roughly the same, but not exactly. Thanks for the input!

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details