/
Prevent a select list from displaying certain options
Prevent a select list from displaying certain options
Video shows how to restrict certain options from showing up. This is pretty simple and an actual use case would require some additional code to restrict certain options based on some logic.
Code below will limit the # of selections a user can make to 3.
Watch Script
This scripts watches customfield_10711 and if a change is detected it runs the script Screen_Listeners/LimitNumberOfSelections.sil.
lfWatch("customfield_10711", {"customfield_10711", "key"}, "Screen_Listeners/LimitNumberOfSelections.sil", "change");
Hook Script
This script is called by a screen listenser Screen_Listeners/LimitNumberOfSelections.sil and is run when a change to customfield_10711 is detected This script will only allow a user to select 3 boxes in a checkbox list.
string [] c = argv["customfield_10711"];
if(arraySize(c) > 2) {
c = deleteElementAt(c, 3);
lfSet("customfield_10711" , c);
}
, multiple selections available,
Related content
Prevent a select list from displaying certain values
Prevent a select list from displaying certain values
More like this
Restrict options or number of selections in a select list
Restrict options or number of selections in a select list
More like this
Create a Select All option in a dropdown list
Create a Select All option in a dropdown list
More like this
Hide multiple fields based on custom field value
Hide multiple fields based on custom field value
More like this
lfAllowSelectOptions
lfAllowSelectOptions
Read with this
lfAllowSelectOptions
lfAllowSelectOptions
More like this
Need support? Create a request with our support team.
Copyright © 2005 - 2025 Appfire | All rights reserved.