It might not be obvious, but here is a tip for working with conditional fields, where the amount of values in selectors is overwhelming (like, more than 5).
Above code will show dependant if any selected value in long...list selector starts with a letter. And will hide it otherwise i.e. if it starts with a digit. This trick makes possible to show input on "KX-1209" and hide input on "2842" in the same list. It would be crazy to code all 12765 values in one func separately
A similar rule may be applied to individual letters: < 'x' will show everything that has as the first symbol a number or A to Z and a to w and will hide x, z and y (case-sensitive). Capital letters are separated with ^ from lowercase ones. For any specific rule, ask here or just review your codepage table.
- Code: Select all
<cms:func _into='my_cond' long_tiresome_list_of_values=''>
<cms:if long_tiresome_list_of_values > '=' >show<cms:else />hide</cms:if>
</cms:func>
Above code will show dependant if any selected value in long...list selector starts with a letter. And will hide it otherwise i.e. if it starts with a digit. This trick makes possible to show input on "KX-1209" and hide input on "2842" in the same list. It would be crazy to code all 12765 values in one func separately
A similar rule may be applied to individual letters: < 'x' will show everything that has as the first symbol a number or A to Z and a to w and will hide x, z and y (case-sensitive). Capital letters are separated with ^ from lowercase ones. For any specific rule, ask here or just review your codepage table.