dynamic dropdown

87 views
Skip to first unread message

tharsh...@gmail.com

unread,
Apr 19, 2023, 11:05:32 AM4/19/23
to Orbeon Forms
Dear All,

I have large dropdown list in google sheet can I add those value in orbeon from. How to feed the data and show me video that is help a lot 

thank you

Alessandro Vernet

unread,
Apr 20, 2023, 12:46:35 AM4/20/23
to orb...@googlegroups.com
Hi Thar,

Are you saying that this list is too long to be realistically entered manually in the Edit Choices dialog of Form Builder? And is this list static, or does it change on a regular basis?

-Alex

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orbeon+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/98f4e0bf-3ebe-41c7-ba65-cca5f6bd5826n%40googlegroups.com.

Tharshan kathir

unread,
Apr 20, 2023, 1:35:11 AM4/20/23
to orb...@googlegroups.com
hi  Alex
Thanks for replying to my message. I added a static method. I can add only approximately 170 items (edit source) so I move to dynamic drop down.  I do not know how to add large numbers of items. I have an excel sheet drop down item list. can i connect https service or any method to connect drop down list  work on orbeon form. 
one again thanks for your help.

You received this message because you are subscribed to a topic in the Google Groups "Orbeon Forms" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/orbeon/m4R4UtjeBE8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to orbeon+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/CANrzKk%3Dk4D3Ykjk0THq%2B5sHDvrM6X%3DiSFy8K6_SJT6B4-0k6gA%40mail.gmail.com.

Alessandro Vernet

unread,
Apr 20, 2023, 4:03:26 PM4/20/23
to orb...@googlegroups.com
Hi Thar,

If you have a larger number of items, it most likely makes sense to have those provided by a service, even if the service is just a static XML file on your web server. You can do this with the Dynamic Dropdown component. You will also find more information about those in the documentation linked below.


Tharshan kathir

unread,
Apr 20, 2023, 11:11:15 PM4/20/23
to orb...@googlegroups.com
Dear Alex 

Can you provide  example of code? 

Tharshan kathir

unread,
Apr 21, 2023, 6:27:16 AM4/21/23
to orb...@googlegroups.com
HI Alex,
I understood the choices Xpath expression , label Xpath expression and value Xpath expression. I did not understand where to create it ?   Where is the path ? can you give me an example?
image.png

Tharshan kathir

unread,
Apr 21, 2023, 6:47:04 AM4/21/23
to orb...@googlegroups.com
Resource URL Path

Alessandro Vernet

unread,
Apr 21, 2023, 9:10:44 PM4/21/23
to orb...@googlegroups.com
Hi Thar,

Are you asking how to "create" the resource URL? That is the URL that points to a page that serves the XML. In its simplest form, you just have a static XML file served by your web server, or even directly by Tomcat. But it can of course be something more complicated, that involves code, and maybe making queries to a database. Does this make sense?

-Alex

Tharshan kathir

unread,
Apr 22, 2023, 12:02:31 AM4/22/23
to orb...@googlegroups.com
hi Alex,

Thanks for replying to my email.  I am planning to do XML file pop up drop down. can you give me sample code just three items is enough ?  and "even directly by Tomcat." that is okay.  one again, thank you for the quick reply. You are very active in customer service. 

Alessandro Vernet

unread,
Apr 23, 2023, 8:14:17 PM4/23/23
to orb...@googlegroups.com
Hi Thar,

As you've most likely noticed already, when you create a new Dynamic Dropdown, it uses a path that returns a list of countries. The content of the dialog is as follows:

image.png

And the XML return by the service is:

<countries>
    <country>
        <name>Afghanistan</name>
        <us-code>af</us-code>
    </country>
    <country>
        <name>Akrotiri</name>
        <us-code>ax</us-code>
    </country>
    <country>
        <name>Albania</name>
        <us-code>al</us-code>
    </country>
    …
</countries>

I hope this helps,

-Alex

Tharshan kathir

unread,
Apr 24, 2023, 12:20:54 AM4/24/23
to orb...@googlegroups.com
Dear Alex,

/fr/service/custom/ orbeon/controls  ?    Where is the path?  Or are we creating the folder in that order? please give quick reply ?

Alessandro Vernet

unread,
Apr 24, 2023, 3:36:51 PM4/24/23
to orb...@googlegroups.com
Hi Thar,

`/fr/service/custom/orbeon/controls/countries` points to a test service that is built in with Orbeon Forms. But if you have your own XML file, you could, for instance, place it in your Tomcat's `webapps/ROOT/my-file.xml`, which means that you would be able to load it from your browser was a URL that looks like `http://localhost:8080/my-file.xml`, and this is the value that you would put in the "Resource URL" field. Does this make sense?

-Alex

Tharshan kathir

unread,
May 1, 2023, 2:16:11 AM5/1/23
to orb...@googlegroups.com
thank you for reply I changed laravel form 

Tharshan kathir

unread,
May 1, 2023, 2:16:38 AM5/1/23
to orb...@googlegroups.com
issue closed

Alessandro Vernet

unread,
May 1, 2023, 11:26:21 AM5/1/23
to orb...@googlegroups.com
Excellent Thar, I'm glad you managed to get this dynamic dropdown to do what you were looking for.

-Alex

Reply all
Reply to author
Forward
0 new messages