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

Dropdown list #75

Open
rpixelworld opened this issue Oct 12, 2019 · 3 comments
Open

Dropdown list #75

rpixelworld opened this issue Oct 12, 2019 · 3 comments

Comments

@rpixelworld
Copy link

@RyanSusana How can we have a dropdown list? Really appreciate

@RyanSusana
Copy link
Owner

Dropdown lists are supported by using enums.
Add an @PrettyName to the enum values to give them nice names.

This should also be in documentation. Thanks :D!

@rpixelworld
Copy link
Author

rpixelworld commented Oct 24, 2019

Thanks for your help.
I have another question, how can we have a dropdown list which is a list of another model.

Like this, category is another model maintained in cms, I would like this category as a dropdown list field.
Screen Shot 2019-10-24 at 15 14 17

@rpixelworld
Copy link
Author

@RyanSusana Thanks for your reply

Actually I am looking for a string field which can only has value from a drop down list. Is there a way to do this? If I am using a enum type, it will give trouble when i am using filter. it will throw error like : class java.lang.String cannot be cast to class java.lang.Enum (java.lang.String and java.lang.Enum are in module java.base of loader 'bootstrap

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

No branches or pull requests

2 participants