1

I'm trying to find a way to extend the meta fields inside a custom field definition. To illustrate:

I need a min_vis def_vis and max_vis column for each field (or anytime a new one is added). Preferably these would be right under the name, handle, instructions text fields. So in this illustration below, there would be a select box added for each of these 3 new meta (or columns) after the instructions meta field.

where extra fields should appear

I know it probably isn't a good idea to modify the core stuff, including the fields table, so should I use a plugin to define some a new model and record? Should I extend the form for fields registration to add these additional attributes as select boxes? Should I give the new attributes their own table (via record class) and set BELONGS_TO where they are related to each field?

column list

If there is a better way to approach this, or if I'm pushing to hard for something custom no worries just give me a heads up that I shouldn't be extending the core fields attributes.

I did look at this issue but wasn't sure if it actually pertained to my question?

0

I'd probably re-think my approach. Creating/extending a field type will give plugins access to the settings area below the horizontal rule in your screenshot, but that's on a per-field type basis and Craft doesn't provide a way to hook into where you're looking.

What are min_vis, def_vis, and max_vis actually being used for?

  • These 3 columns would add a field visibility setting for each field. So when we can set the fields to have a minimum, default, and maximum. Their possible values are private (only viewable to owner), authed (logged in users), and public (everyone). Then we can show content based on the visibilities and allow for setting at a per entry basis as well using min and max as the bounds on content in that entry. Maybe a bit to heavy to try and expand craft in this nature. – Bill Columbia Nov 10 '15 at 18:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.