Forums / Developer / Check if attribute is required
Silke Fox
Wednesday 30 June 2004 1:54:30 am
Does anyone have an idea how to check in a template if an attribute is required (as defined in the content class)?This would be useful for information collector forms to mark the mandatory fields.
Thanks for your time.Silke
Paul Forsyth
Wednesday 30 June 2004 2:15:13 am
Yip, use this code:
{section show=$attribute.contentclass_attribute.is_required|gt(0)} * {/section}
which will show an asterisk if the attribute is required.
paul
--http://www.visionwt.com
Wednesday 30 June 2004 4:35:59 am
Hey, that's easy...Thank you, Paul.