{"id":33482,"date":"2025-08-21T11:20:42","date_gmt":"2025-08-21T05:20:42","guid":{"rendered":"https:\/\/hasthemes.com\/?post_type=docs&#038;p=33482"},"modified":"2025-08-21T16:16:19","modified_gmt":"2025-08-21T10:16:19","password":"","slug":"hidden-field-in-ht-contact-form","status":"publish","type":"docs","link":"https:\/\/hasthemes.com\/docs\/hidden-field-in-ht-contact-form\/","title":{"rendered":"Hidden Field in HT Contact Form"},"content":{"rendered":"\n<p>The Hidden Field allows you to pass data behind the scenes without displaying it to users. It's ideal for storing internal values like tracking IDs, user roles, campaign sources, or default metadata submitted with the form. This field remains invisible on the frontend but sends the stored data along with the form submission.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Add the Hidden Field<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to your <strong>WordPress Dashboard<\/strong> and navigate to: <code>HT Contact Form &gt; Forms<\/code>.<\/li>\n\n\n\n<li>Open an existing form or create a new one.<\/li>\n\n\n\n<li>From the <strong>Fields<\/strong> panel on the left, drag and drop the <strong>Hidden Field<\/strong> into your form layout.<\/li>\n\n\n\n<li>Click on the field to open its <strong>Field Settings<\/strong> tab on the right.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"571\" src=\"https:\/\/hasthemes.com\/wp-content\/uploads\/2025\/08\/ht-contact-form-hiden-filed-form-area-1024x571.png\" alt=\"\" class=\"wp-image-33484\" srcset=\"https:\/\/hasthemes.com\/wp-content\/uploads\/2025\/08\/ht-contact-form-hiden-filed-form-area-1024x571.png 1024w, https:\/\/hasthemes.com\/wp-content\/uploads\/2025\/08\/ht-contact-form-hiden-filed-form-area-300x167.png 300w, https:\/\/hasthemes.com\/wp-content\/uploads\/2025\/08\/ht-contact-form-hiden-filed-form-area-768x428.png 768w, https:\/\/hasthemes.com\/wp-content\/uploads\/2025\/08\/ht-contact-form-hiden-filed-form-area-1536x856.png 1536w, https:\/\/hasthemes.com\/wp-content\/uploads\/2025\/08\/ht-contact-form-hiden-filed-form-area-360x201.png 360w, https:\/\/hasthemes.com\/wp-content\/uploads\/2025\/08\/ht-contact-form-hiden-filed-form-area.png 1580w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Available Settings<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Admin Label<\/strong><br>Internal name used for identifying the field in the admin panel.<br><em>Example: Hidden<\/em><\/li>\n\n\n\n<li><strong>Default Value<\/strong><br>Predefined value that will be submitted with the form.<br><em>Example: \u201cwalker\u201d<\/em><\/li>\n\n\n\n<li><strong>Name Attribute<\/strong><br>Backend name of the field. This is how the value is referenced when the form is processed.<br><em>Example: hidden<\/em><\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"647\" src=\"https:\/\/hasthemes.com\/wp-content\/uploads\/2025\/08\/ht-contact-form-hiden-filed-settings-1024x647.png\" alt=\"\" class=\"wp-image-33485\" srcset=\"https:\/\/hasthemes.com\/wp-content\/uploads\/2025\/08\/ht-contact-form-hiden-filed-settings-1024x647.png 1024w, https:\/\/hasthemes.com\/wp-content\/uploads\/2025\/08\/ht-contact-form-hiden-filed-settings-300x189.png 300w, https:\/\/hasthemes.com\/wp-content\/uploads\/2025\/08\/ht-contact-form-hiden-filed-settings-768x485.png 768w, https:\/\/hasthemes.com\/wp-content\/uploads\/2025\/08\/ht-contact-form-hiden-filed-settings-360x227.png 360w, https:\/\/hasthemes.com\/wp-content\/uploads\/2025\/08\/ht-contact-form-hiden-filed-settings.png 1419w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Example Use Case<\/h3>\n\n\n\n<p>You can use the Hidden Field to:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Capture the source of form traffic (e.g., &#8220;Google Ads&#8221;)<\/li>\n\n\n\n<li>Store default roles like &#8220;subscriber&#8221; or &#8220;new_lead&#8221;<\/li>\n\n\n\n<li>Pass dynamic data from URL parameters via JavaScript<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Hidden Field allows you to pass data behind the scenes without displaying it to users. It&#8217;s ideal for storing internal values like tracking IDs, user roles, campaign sources, or default metadata submitted with the form. This field remains invisible on the frontend but sends the stored data along with the form submission. How to [&hellip;]<\/p>\n","protected":false},"author":22,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_uag_custom_page_level_css":"","_mi_skip_tracking":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"doc_category":[259],"doc_tag":[],"class_list":["post-33482","docs","type-docs","status-publish","hentry","doc_category-ht-contact-forms"],"acf":[],"year_month":"2025-11","word_count":195,"total_views":"158","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"Saidul","author_nicename":"saidul","author_url":"https:\/\/hasthemes.com\/author\/saidul\/"},"doc_category_info":[{"term_name":"HT Contact Forms","term_url":"https:\/\/hasthemes.com\/docs-category\/ht-contact-forms\/"}],"doc_tag_info":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"htmega_size_585x295":false,"htmega_size_1170x536":false,"htmega_size_396x360":false,"betterdocs-category-thumb":false},"uagb_author_info":{"display_name":"Saidul","author_link":"https:\/\/hasthemes.com\/author\/saidul\/"},"uagb_comment_info":0,"uagb_excerpt":"The Hidden Field allows you to pass data behind the scenes without displaying it to users. It's ideal for storing internal values like tracking IDs, user roles, campaign sources, or default metadata submitted with the form. This field remains invisible on the frontend but sends the stored data along with the form submission. How to&hellip;","knowledge_base_info":[],"knowledge_base_slug":[],"_links":{"self":[{"href":"https:\/\/hasthemes.com\/wp-json\/wp\/v2\/docs\/33482","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hasthemes.com\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/hasthemes.com\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/hasthemes.com\/wp-json\/wp\/v2\/users\/22"}],"replies":[{"embeddable":true,"href":"https:\/\/hasthemes.com\/wp-json\/wp\/v2\/comments?post=33482"}],"version-history":[{"count":5,"href":"https:\/\/hasthemes.com\/wp-json\/wp\/v2\/docs\/33482\/revisions"}],"predecessor-version":[{"id":33490,"href":"https:\/\/hasthemes.com\/wp-json\/wp\/v2\/docs\/33482\/revisions\/33490"}],"wp:attachment":[{"href":"https:\/\/hasthemes.com\/wp-json\/wp\/v2\/media?parent=33482"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/hasthemes.com\/wp-json\/wp\/v2\/doc_category?post=33482"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/hasthemes.com\/wp-json\/wp\/v2\/doc_tag?post=33482"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}