make an editable field non-editable after first save

hello experts,

is there a way to make an editable field non-editable after first save.
that is when Not @IsNewDoc I want to make this editable field as non-editable. User
should only be able to enter text in this field for the first time.

Please advise.
thanks
chakrikaAsked:
Who is Participating?
 
mshogrenConnect With a Mentor Commented:
One way to accomplish your goal may be to use a computed field which computes to the value of the original field.  Then use @IsNewDoc in the hide formulas of the two fields to ensure that only one of the fields shows at once.
0
 
Steve KnightConnect With a Mentor IT ConsultancyCommented:
Same difference as above really but I tend to use a piece of computed text and an editable field these days... and hide-when formulas as above.

Steve
0
 
LeepingtangConnect With a Mentor Commented:
You may want to do that at the PostOpen level that picks a value from a field to hide the edittable field and display it on another field that is computed which contains the value of the hidden field.
If this is a webform, then u might use the "document.forms[0].fieldname.disabled = true.
Hope this helps.


0
 
chakrikaAuthor Commented:
this is not a webform... but thanks for the tip. I'll use the computed text and hide this field....
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.