-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Feat: support hidden widget in files collections #3046
Comments
Hi @chokeul8r do you mind sharing your repo? |
Sorry for the late reply, hidden fields are meant to be used on folder collections when creating new items: https://www.netlifycms.org/docs/widgets/hidden/#hidden since they have a pre-defined uneditable value. |
Changed the title to reflect the underlying issue. |
I have the exact same issue.
does not work. It does not show up in the .md file that is produced through the cms |
The plugin It adds the name of the source so you can query it in Graphql |
Hi. Is there a workaround for this? Or an alternative solution to save "invisible" data? |
You could use the |
Thanks @erezrokah. This method is a bit beyond my capabilities for now. :) I added a select widget and a minor inconvenience to the user. |
@erezrokah would it be possible to set multiple |
It should be possible to do so: |
It would be nice to have a widget that didn't display but could save a default value, regardless of whether it was in a folder or file collection, or a field under some other object widget. For my use case, I need to discriminate between different object widgets at run-time, so I'm adding a hidden "kind" field to the widget fields - but this doesn't work if I use these widgets in a file collection. |
What was the solution for that one ? I have the same problem on my side, the Collections works well, but I get a templateKey : null for my Files. In that exemple : https://github.com/robertcoopercode/gatsby-netlify-cms/blob/master/static/admin/config.yml |
Perhaps a "value" widget that embeds a given value but renders as read-only on the admin interface? Kind of makes more sense to me than a hidden widget with a "default" value. - { name: templateKey, value: "blogPost", widget: value } |
I think it makes sense to support the hidden widget (as is) for file collections. and default values are added during entries creation: If someone is up to extend the existing code to support this, the above links should be a good place to start |
Repo: chokeul8r/gncms
I am attempting to use NetlifyCMS in a Gatsby Landing Page project for the first time. My problem relates to the config.yml file and Template key field in particular. The template key is not showing up in my frontmatter and/or my graphgl query.
The text was updated successfully, but these errors were encountered: