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 » Tue Jun 22, 2021 3:09 pm

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: 834
Joined: Wed Nov 16, 2005 11:11 am

Re: CSS: setting default value in oxy_popup

Post by alex_jitianu » Wed Jun 23, 2021 1:07 pm

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 » Wed Jun 23, 2021 5:18 pm

Hi Alex,

Thank you for the clarification. 🙂

Post Reply