Start page / Template development / Rules / Restriction levels / SAVE

Restriction level SAVE (inhibit save)

SAVE: error message at the attempt to save an invalid entry

Rules based on this restriction level inhibit the saving of invalid form content by the editor (and thus also the release of this content).

This restriction level thus represents a massive intervention into the editorial process. In the working area, the editor is informed about the rule violation during entry already (see Display in the working area) and must correct this violation before the (form) content is saved. Otherwise the saving procedure terminates with an error message.

For general information regarding the definition of a restriction level, see Controlling editorial processes (restriction levels).

Examples

Example: inhibiting the saving of an empty input component

The form has an “st_table” input component that must be filled by the editor. For this case, the restriction level SAVE can be assigned by the template developer. As soon as the condition (input component “st_table” is not empty) defined in the value determination is not fulfilled, the input component is marked by the FirstSpirit framework and a correction note appears underneath the input component. If the editor now tries to save the form in this invalid state, an error message will appear and the saving of the form will be inhibited.

<RULES>

<RULE>
<WITH>
<NOT>
<PROPERTY name="EMPTY" source="st_table"/>
</NOT>
</WITH>
<DO>
<VALIDATION scope="SAVE">
<PROPERTY name="VALID" source="st_table"/>
<MESSAGE lang="*" text="The editor must not be empty!"/>
<MESSAGE lang="DE" text="Der Editor darf nicht leer sein!"/>
</VALIDATION>
</DO>
</RULE>

</RULES>
Important The restriction level SAVE represents a massive intervention in the editorial process. This can lead to problems during editing.

Example: Since the conditions of the rule shown here are very generally defined, the editor must fill the corresponding entry field in all project languages during the creation or editing of a form based on this rule in order to save the form. This is probably not desired in all cases.

This means that rules, especially when they intervene in the editorial process in a very restrictive manner, must be prudently defined.

For the case specified above, for example, the definition of a precondition that the subsequent validation is performed only if the form is opened by the editor in the master language of the project would be helpful:

...
<IF>
<EQUAL>
<PROPERTY name="LANG" source="#global"/>
<PROPERTY name="MASTER" source="#global"/>
</EQUAL>
</IF>
...

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