如何在prismic.io CMS中执行必填字段?(How to do mandatory fields in prismic.io CMS?)

系统教程 行业动态 更新时间:2024-06-14 16:54:47
如何在prismic.io CMS中执行必填字段?(How to do mandatory fields in prismic.io CMS?)

我正在使用Prismic.io作为无头CMS并将内容带入我的React前端。 如何设置内容类型以使字段成为必填字段?

这是我到目前为止所拥有的......

{ "Main" : { "uid" : { "type" : "UID", "config" : { "placeholder" : "UID" } }, "image" : { "type" : "Image" }, "title" : { "type" : "StructuredText", "config" : { "single" : "heading1", "placeholder" : "Title..." } }, "description" : { "type" : "StructuredText", "config" : { "multi" : "paragraph,em,strong,hyperlink", "placeholder" : "Description..." } } } }

I'm using Prismic.io as a headless CMS and bringing content into my React front end. How do I set up a content type so that fields are mandatory?

Here's what I have so far...

{ "Main" : { "uid" : { "type" : "UID", "config" : { "placeholder" : "UID" } }, "image" : { "type" : "Image" }, "title" : { "type" : "StructuredText", "config" : { "single" : "heading1", "placeholder" : "Title..." } }, "description" : { "type" : "StructuredText", "config" : { "multi" : "paragraph,em,strong,hyperlink", "placeholder" : "Description..." } } } }

最满意答案

至于现在,prismic.io CMS不允许必填字段。 唯一必需的字段是本机“UID”字段。 他们建议在发布内容之前使用发布商的网站内预览来预览结果,而不是在编辑器中添加约束。

as for now, prismic.io CMS doesn't allow required fields. The only required field is the native "UID" field. They recommend using the in-website preview for publishers to preview the result before shipping content rather than adding constraints in the editor.

更多推荐

本文发布于:2023-04-08 12:35:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/dzcp/c63724ed85c361d329ce5d0b5ceb1547.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:字段   必填   如何在   prismic   CMS

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!