How to conditionally query conditional fields? #10271
Unanswered
rafaell-lycan
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Payload community 👋
I'm building a real-estate app and I'm willing to use Payload as my source of truth but I've been struggling to move things when I need to show/hide specific fields conditionally.
Saying I have a house for rent in a small city where neighborhoods don't matter to fill, or in a big city such as New York/London/Madrid where you can specify which neighborhoods that ad is located. How can I be that specific defining and querying the data?
Here's an example of how I'm mapping Location (state+city+neighborhood) on a post/ad, which leads to an error
https://gist.github.com/rafaell-lycan/7fc7bb379cab7435fc298cf36d0d3941
I appreciate any help you can provide.
Beta Was this translation helpful? Give feedback.
All reactions