Search

Is there any general advice or Wiki on Extending a filed type?

i.e. I'd like to Extend the textarea field with some additional 'text limits' etc.. So in the Section Editor provide an interface that appends to the textarea UI to set a text limitation if required.

I don't want to use the Text Box field as I'd like to build my knowledge of extending a field for future usage in other areas.

Is this where Providers come useful?

Any pointers?

Just include base PHP field class and extend it :)

Depending on your requirements, you will be able to re-use up to 90% of base class code.

However, creation of settings table and data tables must take place in your field (a.k.a. you don't really want your tightly field dependant SQL to come from another class).

The rest is ... well, have a look at other implementations. For a very simple but useful example, see Duration field.

Thanks Vlad, will take a look through this... just looking for a starting point.

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