Jump to content

Single-use Inputfields/Fieldtypes


Pete
 Share

Recommended Posts

I'm working on an inputfield and fieldtype as part of a larger module. I want it installed once, applied to a template and for the field to not be used anywhere else - so not appearing on the list of available fields, not removeable from the template in question etc.

Is this actually possible? The reason behind this is that I still want to allow for custom fields elsewhere in the template, but this field must not be removed.

If not I could be more strict, not allow other fields to be added to the template and make it a system template. I guess this would prevent people from uninstalling the module too which is my other concern?

It's basically for storing things like financial data and other stuff that should never be removed so if they were able to remove the field it would be potentially disastrous and also the rest of the module would fall apart I would imagine.

Any suggestions?

Link to comment
Share on other sites

Thanks Antti - that sorts out preventing it from being removed - if I make it system and permanent then that's great.

I guess to stop it being added to any more templates and hiding it from the field list when adding fields to template I would have to use some hooks, which is fine.

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...