CSS: setting default value in oxy_popup

Post here questions and problems related to oXygen frameworks/document types.
Xander
Posts: 9
Joined: Mon May 10, 2021 10:55 am

CSS: setting default value in oxy_popup

Post by Xander »

Hi there,

I have recently been playing with oxy_popup and I was wondering if it was possible to add a default type value for oxy_popup.

For example in this case, instead of seeing 'No Value' as the default value when a step element is selected, is it possible to change the default values to be another value (such as value1), whenever a step is created.

Code: Select all

*[class ~= "task/step"][importance="value1"]:before,
*[class ~= "task/step"][importance="value2"]:before {
    content: oxy_popup(
    	edit, '@importance',
         	values, "value1, value2,  ",
         	labels, "Value1: , Value2: , 'No Value' ",
         	... ;
    ); 
}
Or should this be done somewhere else?
alex_jitianu
Posts: 1007
Joined: Wed Nov 16, 2005 11:11 am

Re: CSS: setting default value in oxy_popup

Post by alex_jitianu »

Hi,

The default value is detected from the associated schema. In your case the schema doesn't provide a default value so that's way the label associated with the empty value is presented.

I will add an issue to have a defaultValue property on form controls.

Best regards,
Alex
Xander
Posts: 9
Joined: Mon May 10, 2021 10:55 am

Re: CSS: setting default value in oxy_popup

Post by Xander »

Hi Alex,

Thank you for the clarification. 🙂
Post Reply