@@ -64,6 +64,12 @@ export const common = {
6464 title : "Collapsible" ,
6565 type : "boolean" ,
6666 } ,
67+ hidden : {
68+ type : "boolean" ,
69+ title : "Hidden" ,
70+ tooltip :
71+ "When enabled, this field will not be visible in the form, but data can exist and be validated" ,
72+ } ,
6773 } ,
6874 // Using dependencies here instead of if-then-else simplifies reusing the common properties
6975 dependencies : {
@@ -126,7 +132,10 @@ export const common = {
126132 collapsible : {
127133 "ui:widget" : "switch" ,
128134 } ,
129- "ui:order" : [ "showAsModal" , "modal" , "collapsible" , "*" ] ,
135+ hidden : {
136+ "ui:widget" : "switch" ,
137+ } ,
138+ "ui:order" : [ "showAsModal" , "modal" , "hidden" , "collapsible" , "*" ] ,
130139 "ui:padding" : 0 ,
131140 "ui:label" : false ,
132141 } ,
@@ -174,9 +183,7 @@ const collections = {
174183 ...common . optionsSchema ,
175184 } ,
176185 } ,
177- optionsSchemaUiSchema : {
178- ...common . optionsSchemaUiSchema ,
179- } ,
186+ optionsSchemaUiSchema : common . optionsSchemaUiSchema ,
180187 optionsUiSchema : {
181188 type : "object" ,
182189 title : "UI Schema" ,
@@ -188,11 +195,6 @@ const collections = {
188195 common . optionsUiSchema . properties [ "ui:options" ] . dependencies ,
189196 properties : {
190197 ...common . optionsUiSchema . properties [ "ui:options" ] . properties ,
191- hidden : {
192- type : "boolean" ,
193- title : "Do you want this field to be hidden?" ,
194- description : "If yes, this field will not be visible in the form" ,
195- } ,
196198 } ,
197199 } ,
198200 "ui:label" : common . optionsUiSchema . properties [ "ui:label" ] ,
0 commit comments