Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display inidividual dropdown field values based on field conditions #1828

Open
philipschilling opened this issue Apr 15, 2024 · 3 comments
Open

Comments

@philipschilling
Copy link

philipschilling commented Apr 15, 2024

What are you trying to do?

I have setup a form where the user can select from a dropdown a property location and based on the location can select a storage room. I have it setup but I am not happy with the solution because it is not scalable. At the moment, I have created for each location a separate dropdown field containing the storage rooms and the field is triggered by a field condition.

Screen.Recording.2024-04-15.at.16.29.55.mov
Screenshot 2024-04-15 at 16 34 06 Screenshot 2024-04-15 at 16 34 23

What's your proposed solution?

Maybe there already exists a solution how this can be setup in a better way than I have done. If not, I suggest the following:

If you add a condition rule to a select field, show all field values with checkbox in the condition rule where I as user can select which values shall be shown when the condition is true. I need to add multiple rules (one per city) and just select the storage rooms which will be shown on the website frontend. Thereby, I can use one dropdown field for all storage rooms instead of a dropdown field per selected city.

It will make the system more scalable when adding new cities.

Additional context

No response

@philipschilling philipschilling changed the title Display chosen dropdown field values based on field conditions Display inidividual dropdown field values based on field conditions Apr 15, 2024
@engram-design
Copy link
Member

Are the storage rooms unique for every location, or just some? If the former, there's no way around having a new field tied to the selected location. But you can have multiple conditions setup for a location, so if you have a set of storage room values that are applicable to multiple locations that can be setup in a single field.

By the way, when you pick an options-based field for conditions, you shouldn't need to enter the text specifically, you should be able to pick an option set in the field. Refer to the screenshot below:

image

I can't seem to replicate that on my end, and I can see the "Standort" field is a Dropdown.

We'll take a look at your proposed use-case, although that's a major change to how conditions work, where it introduces the ability to add conditions on individual options, not just the field. It's something we can look into though!

@philipschilling
Copy link
Author

  1. Each room has a separate option to identify it by ID because each room is unique (size, etc.). So, your standard solution with shared option values will not work for me.
  2. It is strange that I cannot select from a dropdown the condition values. The field "Standort" is a dropdown field but the condition shows just a text field. I am using optgroup elements in my dropdown. Maybe this could have some influence?

@engram-design
Copy link
Member

Fortunately, I could replicate this with your form setup from your support request, so I'll get that sorted.

The original issue still stands about being able to create conditions based on field options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants