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)
Issue with the retaining the value with the dropdown.
neeraj_kumar
Hi I m facing a typical problem with the values of dropdown.
I m populating the dropdownvalues from the xml file.when i do new form entry ,i see proper value which need to be populated in the dropdown.
But when i create dcr by selecting the values from the dropdown,it get created but when i edit the saved dcr,the values for the dropdown gets changed,it actually now showing the other values of xml element.
I don't understand why it is happening?
I m using callserver to pass ipl in the js.
I have also attached all the file which i have used i.e datacapture.cfg, js and ipl.
The values are fechting from xml see attached xml file.when i do new form entry values are fechting from articlename but when i edit the dcr,its shows the value from the article id.
I m not able to figure out how it is happening.Please have a look seriously and provide solution .
I would be very thankful to you for your sincere support.
Thanks
Neeraj
Find more posts tagged with
Comments
Frederik
you've dumped a good deal of code on us, and a problem description that leaves me rather confused about what your issue is.
Looking quickly at your code, I suspect your problem comes from the fact that you're only populating your 8 select fields in an onChange for the Locale field. Meaning that when you re-edit an existing DCR, those 8 select fields will not be populated, they will only show the previously selected values (not by 'label' but by 'id')
So I think you need to populate your select fields also in an onFormInit, but doing so without unselecting the currently selected values.
Firenze
Agreed with Frederik.
You will have to add an initialization routine that takes the comma delimited list of the selected values and loops through your article xml and marks those as selected when loading the drop down.
Have you tried using an Inline call to fill your drop down?