WOOF_HTML :: option_values( String $str, String $empty_label = "", Boolean $detect_groups = false )
Converts the format of choices and choice groups accepted by the Drop Down List and List Box field types into an array which can then be fed into the WOOF_HTML::options method.
Parameters:
-
The string of new-line seperated options to convert.
-
String $empty_label = ""
If specified, an empty-value option will be added at the start with this label – this is used for a prompt for the select box.
-
Boolean $detect_groups = false
Whether to check for lines prefixed with “–” which will be treated as a new option group (and associated label).