Advertisement
Guest User

Metabox Builder

a guest
Jan 25th, 2023
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.46 KB | None | 0 0
  1. {
  2. "post_type": "meta-box",
  3. "post_title": "Form Page Settings",
  4. "post_date": "2022-11-29 14:22:38",
  5. "post_status": "publish",
  6. "post_content": "",
  7. "settings": {
  8. "object_type": "post",
  9. "post_types": [
  10. "adir_form_page"
  11. ],
  12. "context": "normal",
  13. "priority": "high",
  14. "style": "default",
  15. "class": "",
  16. "prefix": "",
  17. "text_domain": "your-text-domain",
  18. "function_name": "your_prefix_function_name"
  19. },
  20. "fields": "",
  21. "data": [],
  22. "meta_box": {
  23. "title": "Form Page Settings",
  24. "id": "form-page-settings",
  25. "post_types": [
  26. "adir_form_page"
  27. ],
  28. "text_domain": "your-text-domain",
  29. "function_name": "your_prefix_function_name",
  30. "fields": [
  31. {
  32. "name": "Page Subtitle",
  33. "id": "page_subtitle",
  34. "type": "textarea"
  35. },
  36. {
  37. "name": "Page Type",
  38. "id": "page_type",
  39. "type": "select",
  40. "label_description": "Select the page type to use",
  41. "options": {
  42. "intro": "Intro",
  43. "medicalPoa": "Medical POA",
  44. "secondaryMedicalPoa": "Secondary Medical POA",
  45. "goalsOfCare": "Goals of Care",
  46. "values": "Values",
  47. "messages": "Messages",
  48. "submit": "Submit"
  49. },
  50. "placeholder": "Page Type"
  51. },
  52. {
  53. "name": "Toggles",
  54. "id": "toggles",
  55. "type": "group",
  56. "clone": true,
  57. "sort_clone": true,
  58. "clone_default": true,
  59. "fields": [
  60. {
  61. "name": "Heading",
  62. "id": "heading",
  63. "type": "text"
  64. },
  65. {
  66. "name": "Content",
  67. "id": "content",
  68. "type": "textarea"
  69. },
  70. {
  71. "name": "More Label",
  72. "id": "more_label",
  73. "type": "text",
  74. "std": "Learn More"
  75. },
  76. {
  77. "name": "Less Label",
  78. "id": "less_label",
  79. "type": "text",
  80. "std": "Show Less"
  81. }
  82. ],
  83. "visible": {
  84. "when": [
  85. [
  86. "page_type",
  87. "=",
  88. "medicalPoa"
  89. ]
  90. ],
  91. "relation": "or"
  92. }
  93. },
  94. {
  95. "name": "Field Intro",
  96. "id": "field_intro",
  97. "type": "text",
  98. "visible": {
  99. "when": [
  100. [
  101. "page_type",
  102. "=",
  103. "medicalPoa"
  104. ],
  105. [
  106. "page_type",
  107. "=",
  108. "secondaryMedicalPoa"
  109. ]
  110. ],
  111. "relation": "or"
  112. }
  113. },
  114. {
  115. "name": "Secondary MPOA Label",
  116. "id": "secondary_mpoa_label",
  117. "type": "text",
  118. "visible": {
  119. "when": [
  120. [
  121. "page_type",
  122. "=",
  123. "medicalPoa"
  124. ]
  125. ],
  126. "relation": "or"
  127. }
  128. },
  129. {
  130. "name": "Field ID",
  131. "id": "field_id",
  132. "type": "text",
  133. "required": true,
  134. "visible": {
  135. "when": [
  136. [
  137. "page_type",
  138. "=",
  139. "goalsOfCare"
  140. ],
  141. [
  142. "page_type",
  143. "=",
  144. "values"
  145. ],
  146. [
  147. "page_type",
  148. "=",
  149. "messages"
  150. ]
  151. ],
  152. "relation": "or"
  153. }
  154. },
  155. {
  156. "name": "Field Options",
  157. "id": "field_options",
  158. "type": "text_list",
  159. "options": {
  160. "Value": "Value",
  161. "Label": "Label"
  162. },
  163. "clone": true,
  164. "sort_clone": true,
  165. "visible": {
  166. "when": [
  167. [
  168. "page_type",
  169. "=",
  170. "goalsOfCare"
  171. ],
  172. [
  173. "page_type",
  174. "=",
  175. "messages"
  176. ]
  177. ],
  178. "relation": "or"
  179. }
  180. },
  181. {
  182. "name": "Yes Options",
  183. "id": "yes_options",
  184. "type": "text",
  185. "clone": true,
  186. "sort_clone": true,
  187. "visible": {
  188. "when": [
  189. [
  190. "page_type",
  191. "=",
  192. "values"
  193. ]
  194. ],
  195. "relation": "or"
  196. }
  197. },
  198. {
  199. "name": "No Options",
  200. "id": "no_options",
  201. "type": "text",
  202. "clone": true,
  203. "sort_clone": true,
  204. "visible": {
  205. "when": [
  206. [
  207. "page_type",
  208. "=",
  209. "values"
  210. ]
  211. ],
  212. "relation": "or"
  213. }
  214. },
  215. {
  216. "name": "Maybe Options",
  217. "id": "maybe_options",
  218. "type": "text",
  219. "clone": true,
  220. "sort_clone": true,
  221. "visible": {
  222. "when": [
  223. [
  224. "page_type",
  225. "=",
  226. "values"
  227. ]
  228. ],
  229. "relation": "or"
  230. }
  231. },
  232. {
  233. "name": "Comments Placeholder",
  234. "id": "comments_placeholder",
  235. "type": "text",
  236. "visible": {
  237. "when": [
  238. [
  239. "page_type",
  240. "=",
  241. "values"
  242. ]
  243. ],
  244. "relation": "or"
  245. }
  246. },
  247. {
  248. "name": "No Specify Option",
  249. "id": "no_specify_option",
  250. "type": "text",
  251. "visible": {
  252. "when": [
  253. [
  254. "page_type",
  255. "=",
  256. "values"
  257. ]
  258. ],
  259. "relation": "or"
  260. }
  261. },
  262. {
  263. "name": "Custom Fields",
  264. "id": "custom_fields",
  265. "type": "group",
  266. "clone": true,
  267. "sort_clone": true,
  268. "clone_default": true,
  269. "fields": [
  270. {
  271. "name": "Id",
  272. "id": "id",
  273. "type": "text"
  274. },
  275. {
  276. "name": "Type",
  277. "id": "type",
  278. "type": "select",
  279. "options": {
  280. "textarea": "Textarea"
  281. },
  282. "std": "textarea"
  283. },
  284. {
  285. "name": "Label",
  286. "id": "label",
  287. "type": "text"
  288. },
  289. {
  290. "name": "Placeholder",
  291. "id": "placeholder",
  292. "type": "text"
  293. }
  294. ],
  295. "visible": {
  296. "when": [
  297. [
  298. "page_type",
  299. "=",
  300. "messages"
  301. ]
  302. ],
  303. "relation": "or"
  304. }
  305. },
  306. {
  307. "name": "Submit Label",
  308. "id": "submit_label",
  309. "type": "text",
  310. "visible": {
  311. "when": [
  312. [
  313. "page_type",
  314. "=",
  315. "submit"
  316. ]
  317. ],
  318. "relation": "or"
  319. }
  320. },
  321. {
  322. "name": "Confirmation Page",
  323. "id": "confirmation_page",
  324. "type": "text",
  325. "visible": {
  326. "when": [
  327. [
  328. "page_type",
  329. "=",
  330. "submit"
  331. ]
  332. ],
  333. "relation": "or"
  334. }
  335. }
  336. ]
  337. }
  338. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement