Developer forum

Forum » Development » Default value in List Item Types (Check, Radio Dropdown)

Default value in List Item Types (Check, Radio Dropdown)

Claus Kølbæk
Reply

Hey,

Is it possible to define a default value for an Item - radio button list - say I have created 3 radio buttons and want one of them to be checked as default?

Same issue with the Dropdown list where it creates the default value "Nothing selected" - sometimes it simply makes no sense to have a nothing selected option.

And with the check box list I would like to define multiple checkboxes to be checked as default.

If the above is not possible, you may consider this a feature request :)


Replies

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

Hi Claus,

I'm not sure about the context here as we have these types of option lists multiple places in the system. Where are you trying the do this?

- Jeppe

 
Claus Kølbæk
Reply

Hey Jeppe,

I am creating a new field for a new item.

 

Added a screenshot for clarification.

listsinItem.jpg
 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

I see.

It's possible to specify a default value by entering the value of the default option in the Default value field under Data, see screenshot. It's currently not possible to omit the "Nothing selected" option from DropDown lists. I have added a feature request for that.

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

Feature request tracking number is 14718.

 
Claus Kølbæk
Reply

Hey again,

Are you certain that it will actually check the radio button? I atleast cannot seem to get it working. (see screenshot - sorry for the danish.)

How about check boxes? The Default value would then be fx 2,3?

listinItem2.jpg
 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

I works here on my test setup. I've tried radiobutton, checkbox and dropdown lists. All pick up the default values and select the correct default options when creating a new page. It will not take affect on previously created items if you modify an existing Item Type.

For checkboxes you would use the format you mention, "2,3", yes.

 

You must be logged in to post in the forum