{"id":1906,"date":"2023-08-15T12:25:40","date_gmt":"2023-08-15T12:25:40","guid":{"rendered":"https:\/\/addify.store\/documentation\/?page_id=1906"},"modified":"2023-08-17T11:20:01","modified_gmt":"2023-08-17T11:20:01","slug":"how-to-create-user-role-dependent-fields","status":"publish","type":"page","link":"https:\/\/addify.store\/documentation\/woocommerce\/custom-fields-for-woocommerce\/how-tos\/how-to-create-user-role-dependent-fields\/","title":{"rendered":"How to Create User Role-dependent Fields?"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Creating User Role-dependent Fields?<\/h2>\n\n\n\n<p>Custom Fields for WooCommerce gives you the freedom to create fields that are dependent on user roles.&nbsp;<\/p>\n\n\n\n<p>To create a new field that is dependent on user roles, follow the steps below:<\/p>\n\n\n\n<p>Go to <strong>WooCommerce<\/strong> &gt; <strong>Custom Fields<\/strong> &gt; <strong>Add New Field<\/strong>.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Enter the Field Details:<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Add field label<\/li>\n\n\n\n<li>Select field type:\n<ol class=\"wp-block-list\">\n<li>Text<\/li>\n\n\n\n<li>Text area<\/li>\n\n\n\n<li>Email<\/li>\n\n\n\n<li>Select box<\/li>\n\n\n\n<li>Multi-select box<\/li>\n\n\n\n<li>Checkbox<\/li>\n\n\n\n<li>Multi-checkbox<\/li>\n\n\n\n<li>Radio button<\/li>\n\n\n\n<li>Number<\/li>\n\n\n\n<li>Password (accept secret input)<\/li>\n\n\n\n<li>File upload (limit file types and size)<\/li>\n\n\n\n<li>Color picker<\/li>\n\n\n\n<li>Date picker (calendar)<\/li>\n\n\n\n<li>Time picker<\/li>\n\n\n\n<li>Google ReCaptcha<\/li>\n\n\n\n<li>Heading<\/li>\n\n\n\n<li>Message<\/li>\n\n\n\n<li>VAT field<\/li>\n\n\n\n<li>Privacy text<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Create Field Dependency:<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\">\n<li>To create field dependency, create user roles for which you want to show this field on the page. User roles are listed below:<\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Administrator<\/li>\n\n\n\n<li>&nbsp;Editor<\/li>\n\n\n\n<li>&nbsp;Author<\/li>\n\n\n\n<li>&nbsp;Contributor<\/li>\n\n\n\n<li>&nbsp;Subscriber<\/li>\n\n\n\n<li>&nbsp;Customer<\/li>\n\n\n\n<li>&nbsp;Shop manager<\/li>\n\n\n\n<li>&nbsp;Wholesale<\/li>\n\n\n\n<li>&nbsp;B2B<\/li>\n\n\n\n<li>&nbsp;Retailer<\/li>\n\n\n\n<li>&nbsp;Guest<\/li>\n<\/ul>\n\n\n\n<p><em>Note: Leave empty to display field for all.<\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Make Fields Dependable:<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\" start=\"4\">\n<li>To make a field dependent on another field, select \u2018Yes\u2019 from the dropdown.&nbsp;<\/li>\n\n\n\n<li>Choose the field from the dropdown to specify the field it is dependent on.<\/li>\n<\/ol>\n\n\n\n<p>Configure the field formatting and field status to finish creating a new user role-dependent field.<\/p>\n\n\n\n<p>Click on \u2018Publish\u2019 when you are done.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/nQKM7KGRi0r2Stj3Yxx6fVMbeT3kncsaC3WKP7OI5XvdxSIHd9F0zyteMv_5mlI7aqx0RpQZe6jgh0tpwrZb9J5oc-hlP7yRDaI3OgGP8pktKQpbrq0OnCr2Y4R-Q7Oc1ZpYhb-QWoN150OCY00qwyU\" alt=\"\"\/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Creating User Role-dependent Fields? Custom Fields for WooCommerce gives you the freedom to create fields that are dependent on user roles.&nbsp; To create a new field that is dependent on user roles, follow the steps below: Go to WooCommerce &gt; Custom Fields &gt; Add New Field.&nbsp; Enter the Field Details: Create Field Dependency: Note: Leave [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1881,"menu_order":2,"comment_status":"closed","ping_status":"closed","template":"template-parts\/multiple-page-template.php","meta":{"_themeisle_gutenberg_block_has_review":false,"footnotes":""},"class_list":["post-1906","page","type-page","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Create User Role-dependent Fields? - Documentation<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/addify.store\/documentation\/woocommerce\/custom-fields-for-woocommerce\/how-tos\/how-to-create-user-role-dependent-fields\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Create User Role-dependent Fields? - Documentation\" \/>\n<meta property=\"og:description\" content=\"Creating User Role-dependent Fields? Custom Fields for WooCommerce gives you the freedom to create fields that are dependent on user roles.&nbsp; To create a new field that is dependent on user roles, follow the steps below: Go to WooCommerce &gt; Custom Fields &gt; Add New Field.&nbsp; Enter the Field Details: Create Field Dependency: Note: Leave [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/addify.store\/documentation\/woocommerce\/custom-fields-for-woocommerce\/how-tos\/how-to-create-user-role-dependent-fields\/\" \/>\n<meta property=\"og:site_name\" content=\"Documentation\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-17T11:20:01+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/lh6.googleusercontent.com\/nQKM7KGRi0r2Stj3Yxx6fVMbeT3kncsaC3WKP7OI5XvdxSIHd9F0zyteMv_5mlI7aqx0RpQZe6jgh0tpwrZb9J5oc-hlP7yRDaI3OgGP8pktKQpbrq0OnCr2Y4R-Q7Oc1ZpYhb-QWoN150OCY00qwyU\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/addify.store\\\/documentation\\\/woocommerce\\\/custom-fields-for-woocommerce\\\/how-tos\\\/how-to-create-user-role-dependent-fields\\\/\",\"url\":\"https:\\\/\\\/addify.store\\\/documentation\\\/woocommerce\\\/custom-fields-for-woocommerce\\\/how-tos\\\/how-to-create-user-role-dependent-fields\\\/\",\"name\":\"How to Create User Role-dependent Fields? - Documentation\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/addify.store\\\/documentation\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/addify.store\\\/documentation\\\/woocommerce\\\/custom-fields-for-woocommerce\\\/how-tos\\\/how-to-create-user-role-dependent-fields\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/addify.store\\\/documentation\\\/woocommerce\\\/custom-fields-for-woocommerce\\\/how-tos\\\/how-to-create-user-role-dependent-fields\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/lh6.googleusercontent.com\\\/nQKM7KGRi0r2Stj3Yxx6fVMbeT3kncsaC3WKP7OI5XvdxSIHd9F0zyteMv_5mlI7aqx0RpQZe6jgh0tpwrZb9J5oc-hlP7yRDaI3OgGP8pktKQpbrq0OnCr2Y4R-Q7Oc1ZpYhb-QWoN150OCY00qwyU\",\"datePublished\":\"2023-08-15T12:25:40+00:00\",\"dateModified\":\"2023-08-17T11:20:01+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/addify.store\\\/documentation\\\/woocommerce\\\/custom-fields-for-woocommerce\\\/how-tos\\\/how-to-create-user-role-dependent-fields\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/addify.store\\\/documentation\\\/woocommerce\\\/custom-fields-for-woocommerce\\\/how-tos\\\/how-to-create-user-role-dependent-fields\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/addify.store\\\/documentation\\\/woocommerce\\\/custom-fields-for-woocommerce\\\/how-tos\\\/how-to-create-user-role-dependent-fields\\\/#primaryimage\",\"url\":\"https:\\\/\\\/lh6.googleusercontent.com\\\/nQKM7KGRi0r2Stj3Yxx6fVMbeT3kncsaC3WKP7OI5XvdxSIHd9F0zyteMv_5mlI7aqx0RpQZe6jgh0tpwrZb9J5oc-hlP7yRDaI3OgGP8pktKQpbrq0OnCr2Y4R-Q7Oc1ZpYhb-QWoN150OCY00qwyU\",\"contentUrl\":\"https:\\\/\\\/lh6.googleusercontent.com\\\/nQKM7KGRi0r2Stj3Yxx6fVMbeT3kncsaC3WKP7OI5XvdxSIHd9F0zyteMv_5mlI7aqx0RpQZe6jgh0tpwrZb9J5oc-hlP7yRDaI3OgGP8pktKQpbrq0OnCr2Y4R-Q7Oc1ZpYhb-QWoN150OCY00qwyU\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/addify.store\\\/documentation\\\/woocommerce\\\/custom-fields-for-woocommerce\\\/how-tos\\\/how-to-create-user-role-dependent-fields\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/addify.store\\\/documentation\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"WooCommerce\",\"item\":\"https:\\\/\\\/addify.store\\\/documentation\\\/woocommerce\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Custom Fields for WooCommerce\",\"item\":\"https:\\\/\\\/addify.store\\\/documentation\\\/woocommerce\\\/custom-fields-for-woocommerce\\\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"How To\u2019s CFW\",\"item\":\"https:\\\/\\\/addify.store\\\/documentation\\\/woocommerce\\\/custom-fields-for-woocommerce\\\/how-tos\\\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"How to Create User Role-dependent Fields?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/addify.store\\\/documentation\\\/#website\",\"url\":\"https:\\\/\\\/addify.store\\\/documentation\\\/\",\"name\":\"Documentation\",\"description\":\"Documentation for Addify Extensions\",\"publisher\":{\"@id\":\"https:\\\/\\\/addify.store\\\/documentation\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/addify.store\\\/documentation\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/addify.store\\\/documentation\\\/#organization\",\"name\":\"Documentation\",\"url\":\"https:\\\/\\\/addify.store\\\/documentation\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/addify.store\\\/documentation\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/addify.store\\\/documentation\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/Asset-21-2x.png\",\"contentUrl\":\"https:\\\/\\\/addify.store\\\/documentation\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/Asset-21-2x.png\",\"width\":6761,\"height\":1853,\"caption\":\"Documentation\"},\"image\":{\"@id\":\"https:\\\/\\\/addify.store\\\/documentation\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Create User Role-dependent Fields? - Documentation","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/addify.store\/documentation\/woocommerce\/custom-fields-for-woocommerce\/how-tos\/how-to-create-user-role-dependent-fields\/","og_locale":"en_US","og_type":"article","og_title":"How to Create User Role-dependent Fields? - Documentation","og_description":"Creating User Role-dependent Fields? Custom Fields for WooCommerce gives you the freedom to create fields that are dependent on user roles.&nbsp; To create a new field that is dependent on user roles, follow the steps below: Go to WooCommerce &gt; Custom Fields &gt; Add New Field.&nbsp; Enter the Field Details: Create Field Dependency: Note: Leave [&hellip;]","og_url":"https:\/\/addify.store\/documentation\/woocommerce\/custom-fields-for-woocommerce\/how-tos\/how-to-create-user-role-dependent-fields\/","og_site_name":"Documentation","article_modified_time":"2023-08-17T11:20:01+00:00","og_image":[{"url":"https:\/\/lh6.googleusercontent.com\/nQKM7KGRi0r2Stj3Yxx6fVMbeT3kncsaC3WKP7OI5XvdxSIHd9F0zyteMv_5mlI7aqx0RpQZe6jgh0tpwrZb9J5oc-hlP7yRDaI3OgGP8pktKQpbrq0OnCr2Y4R-Q7Oc1ZpYhb-QWoN150OCY00qwyU","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/addify.store\/documentation\/woocommerce\/custom-fields-for-woocommerce\/how-tos\/how-to-create-user-role-dependent-fields\/","url":"https:\/\/addify.store\/documentation\/woocommerce\/custom-fields-for-woocommerce\/how-tos\/how-to-create-user-role-dependent-fields\/","name":"How to Create User Role-dependent Fields? - Documentation","isPartOf":{"@id":"https:\/\/addify.store\/documentation\/#website"},"primaryImageOfPage":{"@id":"https:\/\/addify.store\/documentation\/woocommerce\/custom-fields-for-woocommerce\/how-tos\/how-to-create-user-role-dependent-fields\/#primaryimage"},"image":{"@id":"https:\/\/addify.store\/documentation\/woocommerce\/custom-fields-for-woocommerce\/how-tos\/how-to-create-user-role-dependent-fields\/#primaryimage"},"thumbnailUrl":"https:\/\/lh6.googleusercontent.com\/nQKM7KGRi0r2Stj3Yxx6fVMbeT3kncsaC3WKP7OI5XvdxSIHd9F0zyteMv_5mlI7aqx0RpQZe6jgh0tpwrZb9J5oc-hlP7yRDaI3OgGP8pktKQpbrq0OnCr2Y4R-Q7Oc1ZpYhb-QWoN150OCY00qwyU","datePublished":"2023-08-15T12:25:40+00:00","dateModified":"2023-08-17T11:20:01+00:00","breadcrumb":{"@id":"https:\/\/addify.store\/documentation\/woocommerce\/custom-fields-for-woocommerce\/how-tos\/how-to-create-user-role-dependent-fields\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/addify.store\/documentation\/woocommerce\/custom-fields-for-woocommerce\/how-tos\/how-to-create-user-role-dependent-fields\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/addify.store\/documentation\/woocommerce\/custom-fields-for-woocommerce\/how-tos\/how-to-create-user-role-dependent-fields\/#primaryimage","url":"https:\/\/lh6.googleusercontent.com\/nQKM7KGRi0r2Stj3Yxx6fVMbeT3kncsaC3WKP7OI5XvdxSIHd9F0zyteMv_5mlI7aqx0RpQZe6jgh0tpwrZb9J5oc-hlP7yRDaI3OgGP8pktKQpbrq0OnCr2Y4R-Q7Oc1ZpYhb-QWoN150OCY00qwyU","contentUrl":"https:\/\/lh6.googleusercontent.com\/nQKM7KGRi0r2Stj3Yxx6fVMbeT3kncsaC3WKP7OI5XvdxSIHd9F0zyteMv_5mlI7aqx0RpQZe6jgh0tpwrZb9J5oc-hlP7yRDaI3OgGP8pktKQpbrq0OnCr2Y4R-Q7Oc1ZpYhb-QWoN150OCY00qwyU"},{"@type":"BreadcrumbList","@id":"https:\/\/addify.store\/documentation\/woocommerce\/custom-fields-for-woocommerce\/how-tos\/how-to-create-user-role-dependent-fields\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/addify.store\/documentation\/"},{"@type":"ListItem","position":2,"name":"WooCommerce","item":"https:\/\/addify.store\/documentation\/woocommerce\/"},{"@type":"ListItem","position":3,"name":"Custom Fields for WooCommerce","item":"https:\/\/addify.store\/documentation\/woocommerce\/custom-fields-for-woocommerce\/"},{"@type":"ListItem","position":4,"name":"How To\u2019s CFW","item":"https:\/\/addify.store\/documentation\/woocommerce\/custom-fields-for-woocommerce\/how-tos\/"},{"@type":"ListItem","position":5,"name":"How to Create User Role-dependent Fields?"}]},{"@type":"WebSite","@id":"https:\/\/addify.store\/documentation\/#website","url":"https:\/\/addify.store\/documentation\/","name":"Documentation","description":"Documentation for Addify Extensions","publisher":{"@id":"https:\/\/addify.store\/documentation\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/addify.store\/documentation\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/addify.store\/documentation\/#organization","name":"Documentation","url":"https:\/\/addify.store\/documentation\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/addify.store\/documentation\/#\/schema\/logo\/image\/","url":"https:\/\/addify.store\/documentation\/wp-content\/uploads\/2023\/11\/Asset-21-2x.png","contentUrl":"https:\/\/addify.store\/documentation\/wp-content\/uploads\/2023\/11\/Asset-21-2x.png","width":6761,"height":1853,"caption":"Documentation"},"image":{"@id":"https:\/\/addify.store\/documentation\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/addify.store\/documentation\/wp-json\/wp\/v2\/pages\/1906","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/addify.store\/documentation\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/addify.store\/documentation\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/addify.store\/documentation\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/addify.store\/documentation\/wp-json\/wp\/v2\/comments?post=1906"}],"version-history":[{"count":3,"href":"https:\/\/addify.store\/documentation\/wp-json\/wp\/v2\/pages\/1906\/revisions"}],"predecessor-version":[{"id":1992,"href":"https:\/\/addify.store\/documentation\/wp-json\/wp\/v2\/pages\/1906\/revisions\/1992"}],"up":[{"embeddable":true,"href":"https:\/\/addify.store\/documentation\/wp-json\/wp\/v2\/pages\/1881"}],"wp:attachment":[{"href":"https:\/\/addify.store\/documentation\/wp-json\/wp\/v2\/media?parent=1906"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}