Menu

Solutions to Problems or Custom Needs in a Website

Many solutions we create for one site can be used and appreciated on other sites also.

Have a look at this list of components and solutions we have developed over time and if you could benefit from any of them you are welcome to them.

Please let us know if you would like to discuss the details or would like some help getting one installed.

Mark Buelsing

See if a Particular Option has been Checked

Test to see if one of the checkbox options has been checked.

Say you have a checkbox field, and you want to know if a particular option has been checked. Here is the JS to do it.

Example:

Fieldname: ManagerList

Manager to test for: 33

Items currently checked: 33, 34

 

Syntax:   '[ManagerList]'.indexOf("33") != -1

This means, starting at position 0 in the string of chosen options, the position of the first occurance of "33" is not -1

 

Otherwise you could easily get

- [ManagerList] returns 33,34
- [ManagerList:JsonArray] returns ["33","34"]

Print
2963 Rate this article:
No rating
Please login or register to post comments.
RSS
1234