如何在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.
更多推荐
发布评论