Page 1 of 1

escape commas in oxy_combobox labels

Posted: Thu Dec 08, 2016 7:27 pm
by Doug
Is there any way to escape commas in the comma delimited values of labels in the oxy_combobox css form control function? For example: labels, "lastname\,firstname", lastname1\,"firstname1". I've tried backslashes and various forms of character entities or character numbers. They all still translate to comma before they are displayed and break the match with the number of items in the values list. Would reading the labels from an xml file with oxy_xpath make any difference? Or can I use a different delimiter instead of commas? Thanks, Doug

Re: escape commas in oxy_combobox labels

Posted: Thu Dec 08, 2016 7:44 pm
by Doug
A correction to my initial post is that my attempts so far either translate to commas before being displayed therefore breaking my match with the values list. e.g. "\," or don't translate at all remaining as a character entity or other form of character number in the list, e.g, ",

Re: escape commas in oxy_combobox labels

Posted: Fri Dec 09, 2016 9:30 am
by Radu
Hi Doug,

Typically, when you use a comma in the values of a form control, the content that follows a comma is considered a new value. If you want to include a comma in the values, precede the comma with two backslashes. For example, oxy_combobox(values, '1\\, 2\\, 3, 4, edit, false) will display a combo box having the first value 1, 2, 3 and the second value 4.

Regards,
Radu

Re: escape commas in oxy_combobox labels

Posted: Fri Dec 09, 2016 7:23 pm
by Doug
Perfect! Thanks Radu. I was hoping it would be that easy. Solved.
Doug