-
Notifications
You must be signed in to change notification settings - Fork 432
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
Possibility to render fields based on conditions (computed fields) #677
Comments
Great suggestion. There's no time to prioritize it right now, but I'll add it to our backlog. |
That would be very useful |
Need this feature too. In my case I have "Is a gallery" switch. Depending on its state I need to toggle Block and Images fields. |
My team really would benefit from this as well. We use Sanity for lots of large client projects and our designers (I'm one of them) worry that the UX of Sanity degrades as more fields are added and nested. Being able to "progressively disclose" fields conditionally based on, for example, a switch, radio, or dropdown, would reduce end-user cognitive load and make the CMS feel snappier and more focused. |
Any development on this feature @evenwestvang ? |
Really need this feature. We want to show different sets of categories based on previous selection. |
Also running into this particular use case. We want to show/hide a set of an object's fields depending on a boolean. |
Would love this feature, any progress being made on this? Going to try to implement this in the mean time https://gist.github.com/kmelve/e34feccafe8e9ee3c7e09d60ee3fd4d2 |
+1 for this feature |
+1 for this feature! |
+1 |
Any progress on this issue? |
+1 for this feature. Hope to see it soon! |
There is this alternative headless CMS which provides what we're looking for FYI |
@jamesryan-dev this looks great thank you! |
+1. Would be absolutely awesome to have a simple way to do that. |
+1, seems like a vital feature to have |
+1 would love to see this implemented |
For those who need this functionality ASAP, you can use this small plugin I made: https://github.com/hdoro/sanity-plugin-conditional-field Keep in mind this plugin is meant to be replaced with the official implementation once the Sanity team can prioritize it. It's a band-aid solution. By the way, would love to get @bjoerge 's input on the solidity of this approach as compared to what the official one is aiming at: |
Nice! I´ll try it.
Obrigado, Henrique!
Em qui., 22 de abr. de 2021 às 15:22, Henrique Doro <
***@***.***> escreveu:
… For those who need this functionality ASAP, you can use this small plugin
I made: https://github.com/hdoro/sanity-plugin-conditional-field
Keep in mind this plugin is meant to be replaced with the official
implementation once the Sanity team can prioritize it. It's a band-aid
solution.
By the way, would love to get @bjoerge <https://github.com/bjoerge> 's
input on the solidity of this approach as compared to what the official one
is aiming at:
https://github.com/hdoro/sanity-plugin-conditional-field/blob/881d8ffdd776bcc6aaa071cd416d968027a53a40/src/ConditionalField.tsx#L32-L54
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#677 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AF2XGCHVVETEOS5MOW56UBDTKBSPFANCNFSM4EVV7FPA>
.
|
Thanks a lot for sharing this Henrique, works perfectly, nice and simple 👌 🎉 |
Hi everyone, thank you for your patience on this. There is now a canary out on
|
This is now available in v2.17.0 🎉 |
Thank you really much for making this available. This was definitely needed and makes content editing so much more powerful and versatile. 🤘🏆 |
It would be great to add the possibility to render parts of a form based on values of certain fields.
E.g. imagine you have form with a few bool switches:
Language: EN
,Language: NL
, ...When these bools are enabled we render specific fields related to that language (title, body, etc.).
The text was updated successfully, but these errors were encountered: