Check if attribute is required

Author Message

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

Silke Fox

Wednesday 30 June 2004 4:35:59 am

Hey, that's easy...
Thank you, Paul.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.