Page 1 of 1

literal field type (v2021)

Posted: Mon Mar 13, 2023 4:20 am
by ahmed7

Hello
Is there any way to make field type (literal) in v21?
I mean it can take a value (from expression or default value) and show in (view , edit) pages without ability of edit.
thanks


Re: literal field type

Posted: Mon Mar 13, 2023 7:14 am
by MichaelG

You can set the field to ReadOnly in Page_* server events. For example:

Field.ReadOnly = true;


Re: literal field type

Posted: Mon Mar 13, 2023 11:03 am
by ahmed7

Is the same (readonly) in edit page ?
if yes , so it will make field literal but with not saving the data.
i need to saving this data


Re: literal field type

Posted: Tue Mar 14, 2023 3:36 am
by ahmed7

MichaelG wrote:

You can set the field to ReadOnly in Page_* server events. For example:

Field.ReadOnly = true;

its been literal but not saving the data.


Re: literal field type (v2021)

Posted: Tue Mar 14, 2023 6:45 am
by MichaelG

For edit page, you can simply enable the Read Only option (under Fields -> Edit Page -> Read Only).