Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Setting Width along with the Set options JS element in Formn api
chiksur
Hi All,
We are using the SetOptions Formapi element to set the select values on the initiation of a new DCT.
Issue Faced :By default setoption tag is setting a fixed width for all its select elements.
The width is always set to 40 by default.We would like to set the width to around "20" based on the label length.
We are using the below mentioned tag
IWDatacapture.getItem("/root/Widget_Instance/AccessibilityScope").setOptions(AccessibilityScope_Options);
AccessibilityScope_Options (the select elements array is obtained from a custom function which gets the input based on the format specified below)
new Option(chldnodes.childNodes[0].nodeTypedValue,chldnodes.childNodes[1].nodeTypedValue,true,true);
Label :::: chldnodes.childNodes[0].nodeTypedValue
Value :::: chldnodes.childNodes[1].nodeTypedValue
Find more posts tagged with
Comments
Faizi
As per my understanding you want to set width of drop-down list by FormAPI (JS).
AFAIK there is no any method to set width of a drop-down in FormAPI. Because UI part handled by CSS file. While i found that width of a drop-down is depends on the length of text in an option.