Start page / Template development / Rules / Form properties <PROPERTY/> / Property WEB

WEB property

Environment-dependent validation

Forms can be edited in FirstSpirit SiteArchitect and/or in FirstSpirit ContentCreator. A rule can be used to check which environment the editor is working in. The WEB attribute can be used to define a rule making it possible to display a form element depending on the environment in which the form is opened. This also makes it possible, for instance, to hide input components in FirstSpirit ContentCreator that use functions not supported by ContentCreator (example: input components of modules that use the FirstSpirit AppCenter).

The expression <PROPERTY source='#global' name='WEB'/> can be used in the value determination area of the rule definition (or for the definition of a precondition) and checks whether a form has been opened in FirstSpirit ContentCreator or not. Since this is a generally applicable form property, the object #global has to be assigned to the source attribute.

Examples

Example 1) Hiding a component in the FirstSpirit SiteArchitect

<RULE>
<WITH>
<PROPERTY source="#global" name="WEB"/>
</WITH>
<DO>
<PROPERTY source="#form.st_WebClient_only" name="VISIBLE"/>
</DO>
</RULE>

Example 2) Hiding a component in FirstSpirit ContentCreator

<RULE>
<WITH>
<NOT>
<PROPERTY source="#global" name="WEB"/>
</NOT>
</WITH>
<DO>
<PROPERTY source="#form.st_JavaClient_only" name="VISIBLE"/>
</DO>
</RULE>

© 2005 - 2024 Crownpeak Technology GmbH | All rights reserved. | FirstSpirit 2024.6 | Data privacy