Returns a custom-formatted version of the list.
[ listFormat(list, listFormat, itemFormat, separator) ][ listFormat(list, listFormat, itemFormat, separator, delim) ][ listFormat("apple,bear,cat", "BEGIN LIST<br>%list<br>END LIST", "This item is: %item", "<br>") ](prints items on separate lines)
Convert a string list to html list:[R: listFormat( "apple, bear, cat", "<ul>%list</ul>", "<li>%item</li>", "" ) ]
Create an option list input (drop-down list selection) for an html form, with the names of selected tokens:
[R: listFormat( getSelectedNames( "%%" ), "<select name='test'>%list</select>", "<option value='%item'>%item</option>", "", "%%" ) ]The first argument is the list, returned by getSelectedNames(): it has a delimiter specified ("%%"), to avoid PC names with commas or anything other than "%%" from appearing as more than one item. The second argument specifies html (text) to go around the entire formatted list, and the third is html to wrap around each item in the list. The fourth argument is blank (empty), since no separator between items is needed in this case. The fifth argument is usually optional, but in this case is the same delimiter specified in getSelectedNames(), to allow listFormat to find each item in the list.