Hello Kentico Community,
I am encountering an issue with the {% Now %} macro in Xperience by Kentico version 29.3.0. I am trying to display the current date and time in a form field when the form is rendered. However, instead of showing the current date and time, the {% Now %} macro is being displayed as a literal string in the form field, like this: {% Now %}.
Steps I have taken:
- Created a Text field in Form Builder.
- Set the Default Value of the field to
{% Now %}. - Ensured the form is published and cached properly.
- Tried clearing the cache and testing again.
Issue:
- The
{% Now %}macro does not resolve to the current date and time. Instead, it shows{% Now %}as plain text when the form is rendered. - I have tested with other macros (like
{% DateTime.Now %}), but the issue persists.
Questions:
- Is there any configuration needed in Xperience by Kentico 29.3.0 to enable the processing of macros in form fields?
- Is the
{% Now %}macro supported in this context for form fields, or is there a different macro that should be used to display the current date and time?
Any assistance or suggestions would be greatly appreciated!
Thank you