cancel
Showing results for 
Search instead for 
Did you mean: 

How to set a default value in a Value Help Drop Down List

Former Member
0 Kudos

Hi,

I used an age Range field in my adobe form, the control is a Value Help Drop Down List. i am populating the drop down using following code.

IWDAttributeInfo ageInfo = wdContext.nodePersonalData().getNodeInfo().getAttribute("CTAgeRange");

ISimpleTypeModifiable ageType = ageInfo.getModifiableSimpleType();

IModifiableSimpleValueSet ageValueSet = ageType.getSVServices().getModifiableSimpleValueSet();

ageValueSet.put("1","21-29");

ageValueSet.put("2","30-34");

ageValueSet.put("3","35 or Above");

My requirement is to set a default value e.g. 30-34 in the age range field.

I want to give input to iform from my Implementation code only.

Please help.

Thanks in advance

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

hi Ranjan,

that means you have to set at design time,

to set default drop down value you will have to set the value for particular attribute (which is linked to the dropdown element) in the context

like

wdContext.currentContext<nodeName>Element.set<FieldName>(<default value>)

This generally done in Initialization method of the controller.