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)
Related Combos
jrgomez
Hi there:
I am trying to syncronize two combos, one contents provinces and the other one contents the cities in that province. Can you do that with interwoven easily? Is it worthwhile? Do you have some example code?
Another option might be to use instead of a combo of the cities to use a textbox with to introduce the city...which is not so elegant and makes dificult to validate whether the city introduced is ok or not.
Thanks for any help given
Jose Ramón Gómez Pradal
Find more posts tagged with
Comments
Adam Stoller
If you search this forum, you'll find at least one thread (within the last couple of months) that goes into quite a bit of detail as to how to accomplish this - basically using javascript within the DCT - I suggest you start there.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
jbonifaci
As I said in my other post to you, this is a fairly common thing in DCTs, but requires custom coding. You will need to work with FormAPI to do this. Specifically you will need an onItemChange event for your province item. This onItemChange event would then call a function that determines the list of cities in the the province selected and uses .setOptions() to set the options of city item.
I believe Adam may have been referring to
this
post, but I could be wrong. There have been other posts about this as well.
If you're looking for a simple answer that doesn't require any custom coding, you won't find it. You're going to have to write this functionality yourself using the tools mentioned above.
~Jeff
TestReport.rptdesign
mstradling
Or you could just copy the code to do this from page 62 of the Forms Publisher: FormAPI Developers Guide.
The example is called The Location User Script and "This example displays a list of regions and cities in a region. A list of cities is dynamically populated whenever the user changes region." which sounds to be basically what your trying to do.
jrgomez
Whow !!!!!
Thanks a lot Fish, Jeff and Mark. I have just found the awnser in a message post some time ago. Anyway I haven't tried it yet.
I didn't expected to be answered so quickly and so well.
Thanks again.
Joserra
Bhargav Coca
Please post the link here, some one who is in need of it will also check it out.
Thanks