Enhancement Request - Hide fields in editor

6 posts by 2 authors in: Forums > CMS Builder
Last Post: September 4, 2018   (RSS)

By garyhoffmann - August 29, 2018

This may seem counter-intuitive, but please let me explain...

We have a rather complex set of fields in our "Main Navigation" or "Main Pages" section of our sites.  Not all of our users need or have paid for all the fields.  However, my code base assumes some of the fields exist - for the most part, I do check with if (!empty($field)) before doing anything with it, but in some of our code, I'm sure I don't.

It would be incredibly wonderful, rather than removing fields from the editor, to simply be able to hide them so that users can't see them.  In the section editor, you'd obviously be able to see all of the fields so you can unhide them if necessary, but while editing rows in that particular section, only the fields that were not hidden would show.

We have a set of about 60 different tables we install on every site.  In the account setup, we give the users access to the tables they need (or have paid for).  It would be great to also be able to hide fields that a user either doesn't need to see (less confusion) or if they are related to functionality for which the user has not paid (reduces the explanation related to "what does this field mean").

By kitsguru - September 4, 2018

You could try setting the field type to system. That might do what you need. You might also look at the free add on 'showHideDependentFieldsPlus'. In combination that would give you a lot of options.

Jeff Shields

By garyhoffmann - September 4, 2018

Hi Jeff,

I tried the system field - the problem is there is no easy way to get it back into a regular field if you need to.  This causes some issues if, say, a user does purchase something or need something they didn't need before.  The only way I have found to deal with this is to go back to the schema file.

I'll have to investigate the show/hide add-on again.  It's been a while since I looked at it, but for some reason opted not to use it at that time.  I just don't recall why.

Thank you for the input.

Gary.

By kitsguru - September 4, 2018

To return a field to regular use, edit the field and under advanced, click the system field checkbox off.

Jeff Shields

By garyhoffmann - September 4, 2018

That actually works perfectly - by setting the field to System and setting it to Admin only, we will see the field, but the customer will not.  That's perfect!

Thanks,

Gary.