Clarification: Disabling edit access on certain fields for different users -- best way to do this?

Hi EE,

I have created a form and need to allow / disallow certain fields for certain roles..  ( ie. some can edit, some should just be able to view ).

Researched on EE and found this solution:
extract: Another option would be to have two fields, one editable and the other Computed for Display.  You can hide/unhide the specific field based on the user. (rgade)

Is this the best way to achieve what I want?  I question it as the post was from 1998..  I have seen previously a form formula used but this meant creating/maintaining several versions of the one form which sounds like hard ( excessive ) work.

Just wanting some clarification,



Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

Sjef BosmanConnect With a Mentor Groupware ConsultantCommented:
Since 1998, nothing has changed. It is the usual approach: two fields, on separate lines, but all in one form. Each line (paragraph) has a separate hide-when formula, the hide-when is NOT a property of a field (although the Field properties window makes one assume it is). IMHO, controlled access sections are usually too heavy a method to prevent displaying or editing data. Usually, a table is created; in one cell, on separate lines, two fields are placed, one editable, the other computed for display, with the value  of the editable field.

Rarely you have to use multiple forms for the same document:
- Notes and Web are presented differently
- language-dependent versions
- other odd situations where a form formula is used in a view
I would use controlled access sections to achieve your goal with authorized authors fields. you don't have to hiding/showing editable/computed for display fields.

hope this helps
cezarFConnect With a Mentor Commented:
another approach is to use computed subforms. group all editable fields in one subform and the non-editable in another.      i used this approach once in a web application (in contrary to my previous comment. dont like computed sections in web) wherein only some fields are editable at some point of the form filling process.
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Sjef BosmanGroupware ConsultantCommented:
Yes, possible, although that would enhance the maintenance effort, wouldn't you say?
Steve KnightConnect With a Mentor IT ConsultancyCommented:
And in all these cases don't forget this is only suitable if you want a casual user not entering data in the field.  Anyone *could* write an agent to update a field even if it isn't on the form they can get to if they know how and you can see field contents in the document properties if you have read access to the document.  Use encryption and signing if field contents if needed...

I tend to use these days one field to edit with and a computed text entry with opposite hide-when formulas.  The computed text entry can also then easily give a human readable summary of the data then, e.g. "This record, value 123 was closed by XYZ on 31/03" rather than taking up space with three lines of fields.

marilyngConnect With a Mentor Commented:
You know, I did the subforms thing, and there's a real performance hit after three on a document...  I used to wonder why the mail templates didn't use subforms and shared fields.. well, duh, performance hit.  Each requires a new connection to the server.

NOt to mention that you have to close and open the document to get the subform to change.

I ended up using computed table rows!!  Show row when field contains a value.  This way I could put all my code under my "Next" or "Back" buttons, and didn't have to have this really LONG form and a bunch of expandable sections (which I really hate).  Also, I could control the workflow - can't go to the next step until you finish this one.

You would think that the printing might be affected, but it does print all rows-- but I ended up doing a print version of the form, to make it prettier.
Sjef BosmanGroupware ConsultantCommented:
Computed table rows? As in Programmable tables, in the Designer Help? Hmm, yes, hmm ...
Yes, programmable tables.. thanks for the correct syntax.  Solved all my survey applications.. :))
BroadAustraliaAuthor Commented:
woah thanks for all the info!
All Courses

From novice to tech pro — start learning today.