Hi I am using Alternative forms-> layouts to show edit form to user. There are some form fields i want to show depending on other fields value. I am using {% CurrentDocument.GetValue("ItemID") #%} to get field value of current document, but it's not working. is there any way to access form fields in layouts using macros.
HI
you can use {%EditedObject.YourFieldName|(identity)GlobalAdministrator%} in your custom design.
{%EditedObject.YourFieldName|(identity)GlobalAdministrator%}
but if you like to access field value in visibility or enable condition you can use {FieldName.Value}
{FieldName.Value}
If it's about accessing a value then you could use {%FieldName%} to access value of any field.
{%FieldName%}
In order to show/hide that value based on some other value you may have to think writing conditional statements using macros - Kentico Macros
Please, sign in to be able to submit a new answer.