How show/hide field based on content type?
Original Post by Alexander (Imported from Ardevia Forum)
Hi!
I'm trying to hide a field depending on the content type of a list item.
In expression builder I see field names, but not the content type property.
Is it possible?
If so, how?
Regards,
Alexander
-
Original Post by Vitaliy Zadorozhnyy (Imported from Ardevia Forum)
Hi Alexander,
We have done this on the edit form by using visible expression on some field.
To achieve desired behavior please set following code in visible expression on some field:Code:
var formUniqueId = window.Ardevia.Expressions.Core.Evaluator.Context.FormUniqueId; return window[formUniqueId + 'FormCtx'].ListData.ContentType != '<Content Type Name>'
Replace <Content Type Name> with name of specific content type and change evaluation type to Function Code instead of default Assignment for visible expression in the builder.
0 -
Original Post by Alexander (Imported from Ardevia Forum)
Thanks!
It worked fine!0 -
Hi Alexander,
with the latest version of skybow rich forms it's even easier. There is a Placeholder to use for the check.
Cheers
Matthias
0
Please sign in to leave a comment.
Comments
3 comments