Return Value in Combobox

I’m sure this is obvious but I can’t find the solution …?

I have a simple combobox with a custom values (setup with the 7 days of the week, Mon to Sun).

On the form I don’t have a dataprovider (its set to none) and have the field with the valuelist set to the valuelist with the 7 days of the week.

The combobox displays the days of the week fine, but how do I retrieve the value selected when the value changes as I don’t have a dataprovider ?

e.g var val_selected = elements.cmb_day_week

if (val_selected == ‘monday’)
{ do something}

I have found that the onDataChange does not get activated unless I have a dataprovider. In this case I can’t see why I’d need a dataprovider as the valuelist has all the required information ie. the 7 days of the week.

Yummy - as you’ve discovered - if you want to do anything with returned data from Combo Box - the return must be held in a dataprovider to be available.

Easiest way to handle this is to set-up a form variable - and use that as the data provider.