Limit the amount of selections in a CMS_INPUT_LIST
Author: oschlueter
Publication Date: 10/23/2014 10:18
Hello community,
we want to provide means to select a limited amount of elements, for this purpose we tried to use a CMS_INPUT_LIST filled with <CMS_INCLUDE_OPTIONS type="database">. This works quite well, unfortunately we were unable to restrict the amount of selected elements using rules, here is what we tried:
<RULES>
<ON_SAVE>
<WITH>
<NOT>
<GREATER_THAN>
<PROPERTY source="st_country_list" name="SIZE"/>
<NUMBER>5</NUMBER>
</GREATER_THAN>
</NOT>
</WITH>
<DO>
<VALIDATION>
<PROPERTY source="st_country_list" name="VALID"/>
<MESSAGE lang="*" text="No more than five countries may be selected!"/>
</VALIDATION>
</DO>
</ON_SAVE>
</RULES>
Neither did using <PROPERTY source="st_country_list" name="LENGTH"/> yield the desired result.
Are we doing something wrong or would we have to implement a custom value service for this?
Regards,
Oliver
-
Author: StefanSchulz - 10/23/2014 12:01
Hi Oliver,
Did you check the log files for warnings on unknown properties? There is neither a SIZE nor a LENGTH property defined for CMS_INPUT_LIST in any released version of FirstSpirit.
Cheers,
Stefan
0
Vous devez vous connecter pour laisser un commentaire.
Commentaires
1 commentaire