0

I'm using the Webforms module for Drupal 10 and I am trying to create a form with 2 select boxes related to 2 content types:

Content type: "Country" Content type: "City"

I'd like the user to select the country from a dropdown list of available countries, and then, depending on that choice, a second dropdown list would be shown with ONLY the cities available in that country.

How can I achieve this logic? I'm experimenting with "entity select" input type and looking into "reference method" which has a "views" options.

Is this the way to solve the issue? Create one view for each country and linking that view to the webform "reference method"? Seems cumbersome, is it possible to achieve this programatically?

2
  • 1
    Does this answer your question? hierarchical select based in taxonomy for webform
    – mona lisa
    Commented Nov 17, 2023 at 21:13
  • @cilefen that seems to work but with taxonomy terms which I am not using ... I am using custom content types. But I will check this option
    – BMM
    Commented Nov 21, 2023 at 16:37

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.