escape commas in oxy_combobox labels

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Doug
Posts: 28
Joined: Sat Jun 15, 2013 1:34 am

escape commas in oxy_combobox labels

Post 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
Doug
Posts: 28
Joined: Sat Jun 15, 2013 1:34 am

Re: escape commas in oxy_combobox labels

Post 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, ",
Radu
Posts: 9053
Joined: Fri Jul 09, 2004 5:18 pm

Re: escape commas in oxy_combobox labels

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Doug
Posts: 28
Joined: Sat Jun 15, 2013 1:34 am

Re: escape commas in oxy_combobox labels

Post by Doug »

Perfect! Thanks Radu. I was hoping it would be that easy. Solved.
Doug
Post Reply