{"id":7331,"date":"2019-02-28T16:03:03","date_gmt":"2019-02-28T16:03:03","guid":{"rendered":"https:\/\/crocoblock.com\/knowledge-base\/?post_type=article&#038;p=7331"},"modified":"2024-01-09T14:02:32","modified_gmt":"2024-01-09T14:02:32","slug":"how-to-use-hidden-and-calculated-field-types-to-create-formulas-based-on-the-values-from-the-booking-form-fields","status":"publish","type":"article","link":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-use-hidden-and-calculated-field-types-to-create-formulas-based-on-the-values-from-the-booking-form-fields\/","title":{"rendered":"How to Use Hidden and Calculated Field Types"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"title1\">Hidden and Calculated Field types<\/h2>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\"><div class=\"wp-block-group__inner-container\">\n<p>Let\u2019s clear up what the Hidden field type means. In fact, the name speaks for itself. You may add value to this field that won\u2019t be visible on the front but can be used for calculations.<\/p>\n\n\n\n<p><strong>Calculated fields<\/strong> help you to use formulas. Using it, you can make any calculations using math formulas based on macros and display the result on the front end. The values for the formulas you can take either from meta fields created previously for your custom post or from the fields filled on the front end by users.<\/p>\n\n\n\n<div class=\"note-banner d-flex border-bold border-jetsmartfilters rounded overflow-hidden p-20\"><div class=\"mr-12\"><svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><path d=\"M1 21H23L12 2L1 21ZM13 18H11V16H13V18ZM13 14H11V10H13V14Z\" fill=\"#FA5450\"\/><\/svg><\/div><div class=\"d-flex flex-column\"><div class=\"text-900 mb-12\">Warning<\/div><p class=\"m-0\">If you take the value of the Hidden field for the formula, be aware that it is attached to some meta field. The formula will work correctly only on those pages or posts where that meta field is added.<\/p><\/div><\/div>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"title2\">Using Hidden and Calculated Field Types<\/h2>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\"><div class=\"wp-block-group__inner-container\">\n<p>Let\u2019s consider an example of using these fields. We\u2019ll create a short <strong>Form<\/strong> for a product purchase.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"adding-hidden-field\">Adding hidden field<\/h3>\n\n\n\n<p>First of all, create fields to display the product\u2019s <strong>Price<\/strong>:<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2022\/12\/chf-1-2x.png\" alt=\"price field\">\n\n\n\n<p>and <strong>Quantity<\/strong>:<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2022\/12\/chf-2-2x.png\" alt=\"quantity field\">\n\n\n\n<p>Now, it is time for the <strong>Hidden<\/strong> field. In this tutorial, we\u2019ll create a field for Tax, which further will be added to the final price so that on the front end, visitors won\u2019t see the Tax field separately, but its value will be considered in the formula calculating the <strong>Total Price<\/strong>.<\/p>\n\n\n\n<p>Create a new field and select <strong>Hidden<\/strong> from the dropdown list in the <strong>Type<\/strong>:<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2022\/12\/chf-3-2x.png\" alt=\"hidden field type\">\n\n\n\n<p>and input <strong>Name<\/strong> value:<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2022\/12\/chf-4-2x.png\" alt=\"hidden field name\">\n\n\n\n<p>Next, in the<strong> Field Value,<\/strong> select <strong>Current Post Meta<\/strong> and input meta field name ID:<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2022\/12\/chf-5-2x.png\" alt=\"hidden field settings\">\n\n\n\n<p>This value stands for pulling data from your <strong>Custom Post Type<\/strong> meta field. Let\u2019s see where it can be located:<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2022\/12\/chf-6-2x.png\" alt=\"tax field\">\n\n\n\n<h3 class=\"wp-block-heading\" id=\"adding-calculated-field\">Adding calculated field<\/h3>\n\n\n\n<p>Now, let\u2019s create a <strong>Calculated<\/strong> field and see how the <strong>Hidden<\/strong> field can be used there. We assume this field\u2019s purpose is to calculate the total price of the product, including tax. Create a new field and select its type as <strong>Calculated,<\/strong> and input a name for it.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2022\/12\/chf-7-2x.png\" alt=\"calculated field type and name\">\n\n\n\n<p>In the <strong>Calculation Formula<\/strong> field, you need to input a math formula, which will further calculate the product\u2019s total price depending on the quantity a visitor selects. Plus, we need it to consider tax and summarize the final price accordingly.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2022\/12\/chf-8-2x.png\" alt=\"calculated field settings\">\n\n\n\n<p>In this particular case for our tutorial, our <strong>Calculation Formula<\/strong> consists of <strong>Product Quantit<\/strong>y multiplied by the <strong>Product Price<\/strong> plus <strong>Tax<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><b><code>%FIELD::Quantity%*%FIELD::Price%+%FIELD::Tax%<\/code><\/b><\/code><\/pre>\n\n\n\n<p>where <b><code>%FIELD::Tax%<\/code><\/b> is a <strong>Hidden<\/strong> field type.<\/p>\n\n\n\n<div class=\"note-banner d-flex border-bold border-jetsmartfilters rounded overflow-hidden p-20\"><div class=\"mr-12\"><svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><path d=\"M1 21H23L12 2L1 21ZM13 18H11V16H13V18ZM13 14H11V10H13V14Z\" fill=\"#FA5450\"\/><\/svg><\/div><div class=\"d-flex flex-column\"><div class=\"text-900 mb-12\">Warning<\/div><p class=\"m-0\">The formula will work correctly only if you use the fields with <strong>Number<\/strong> type for it.<\/p><\/div><\/div>\n\n\n\n<p>Add <strong>Calculated Value Prefix<\/strong>, which will be displayed on the frontend, and click the &#8220;<strong>Apply Changes<\/strong>&#8221; button:<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2022\/12\/chf-9-2x.png\" alt=\"calculated value prefix\">\n\n\n\n<p>When your <strong>Form<\/strong> is ready, click the &#8220;<strong>Publish<\/strong>&#8221; button:<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2022\/12\/chf-10.png\" alt=\"publish form section\">\n\n\n\n<p>Let\u2019s see how it works on the front:<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2022\/12\/chf-11.png\" alt=\"booking form on the front\">\n\n\n\n<p><strong>Price<\/strong> and <strong>Quantity<\/strong> fields are visible, and the <strong>Tax<\/strong> field is not; however, in the <strong>Total <\/strong>calculation formula, its value is considered.<\/p>\n\n\n\n<p>If we describe it as a math formula: <\/p>\n\n\n\n<p>20 (Price) * 1 (Quantity) + 5 (Tax (hidden field)) = 25<\/p>\n\n\n\n<p>If a visitor changes <strong>Quantity<\/strong>, the formula still calculates the <strong>Total Price<\/strong> considering tax value:<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2022\/12\/chf-12.png\" alt=\"changed value in the form\">\n<\/div><\/div>\n\n\n\n<p>That\u2019s all. Now you know how to use <strong>Hidden<\/strong> and <strong>Calculated<\/strong> field types to create formulas based on the values from the form fields. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>From this tutorial, you will get knowledge of how to work with Hidden and Calculated field types to create math formulas that your visitors could use for their Forms on the front end.<\/p>\n","protected":false},"author":11,"featured_media":0,"template":"","format":"standard","builder-category":[],"article-category":[403],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to operate with Hidden Fields \u2014 JetEngine | Crocoblock<\/title>\n<meta name=\"description\" content=\"Study how the Hidden fields can be used for the form structure. Use wide opportunities of the JetEngine Form widget for the Elementor editor.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-use-hidden-and-calculated-field-types-to-create-formulas-based-on-the-values-from-the-booking-form-fields\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to operate with Hidden Fields \u2014 JetEngine | Crocoblock\" \/>\n<meta property=\"og:description\" content=\"Study how the Hidden fields can be used for the form structure. Use wide opportunities of the JetEngine Form widget for the Elementor editor.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-use-hidden-and-calculated-field-types-to-create-formulas-based-on-the-values-from-the-booking-form-fields\/\" \/>\n<meta property=\"og:site_name\" content=\"Help Center\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-09T14:02:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2022\/12\/chf-1-2x.png\" \/>\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=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-use-hidden-and-calculated-field-types-to-create-formulas-based-on-the-values-from-the-booking-form-fields\/\",\"url\":\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-use-hidden-and-calculated-field-types-to-create-formulas-based-on-the-values-from-the-booking-form-fields\/\",\"name\":\"How to operate with Hidden Fields \u2014 JetEngine | Crocoblock\",\"isPartOf\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#website\"},\"datePublished\":\"2019-02-28T16:03:03+00:00\",\"dateModified\":\"2024-01-09T14:02:32+00:00\",\"description\":\"Study how the Hidden fields can be used for the form structure. Use wide opportunities of the JetEngine Form widget for the Elementor editor.\",\"breadcrumb\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-use-hidden-and-calculated-field-types-to-create-formulas-based-on-the-values-from-the-booking-form-fields\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-use-hidden-and-calculated-field-types-to-create-formulas-based-on-the-values-from-the-booking-form-fields\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-use-hidden-and-calculated-field-types-to-create-formulas-based-on-the-values-from-the-booking-form-fields\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/crocoblock.com\/knowledge-base\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Articles\",\"item\":\"https:\/\/crocoblock.com\/knowledge-base\/articles\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to Use Hidden and Calculated Field Types\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#website\",\"url\":\"https:\/\/crocoblock.com\/knowledge-base\/\",\"name\":\"Help Center\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/crocoblock.com\/knowledge-base\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#organization\",\"name\":\"Help Center\",\"url\":\"https:\/\/crocoblock.com\/knowledge-base\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/04\/invert-crocoblock-logo.svg\",\"contentUrl\":\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/04\/invert-crocoblock-logo.svg\",\"caption\":\"Help Center\"},\"image\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to operate with Hidden Fields \u2014 JetEngine | Crocoblock","description":"Study how the Hidden fields can be used for the form structure. Use wide opportunities of the JetEngine Form widget for the Elementor editor.","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:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-use-hidden-and-calculated-field-types-to-create-formulas-based-on-the-values-from-the-booking-form-fields\/","og_locale":"en_US","og_type":"article","og_title":"How to operate with Hidden Fields \u2014 JetEngine | Crocoblock","og_description":"Study how the Hidden fields can be used for the form structure. Use wide opportunities of the JetEngine Form widget for the Elementor editor.","og_url":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-use-hidden-and-calculated-field-types-to-create-formulas-based-on-the-values-from-the-booking-form-fields\/","og_site_name":"Help Center","article_modified_time":"2024-01-09T14:02:32+00:00","og_image":[{"url":"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2022\/12\/chf-1-2x.png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-use-hidden-and-calculated-field-types-to-create-formulas-based-on-the-values-from-the-booking-form-fields\/","url":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-use-hidden-and-calculated-field-types-to-create-formulas-based-on-the-values-from-the-booking-form-fields\/","name":"How to operate with Hidden Fields \u2014 JetEngine | Crocoblock","isPartOf":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/#website"},"datePublished":"2019-02-28T16:03:03+00:00","dateModified":"2024-01-09T14:02:32+00:00","description":"Study how the Hidden fields can be used for the form structure. Use wide opportunities of the JetEngine Form widget for the Elementor editor.","breadcrumb":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-use-hidden-and-calculated-field-types-to-create-formulas-based-on-the-values-from-the-booking-form-fields\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-use-hidden-and-calculated-field-types-to-create-formulas-based-on-the-values-from-the-booking-form-fields\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-use-hidden-and-calculated-field-types-to-create-formulas-based-on-the-values-from-the-booking-form-fields\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/crocoblock.com\/knowledge-base\/"},{"@type":"ListItem","position":2,"name":"Articles","item":"https:\/\/crocoblock.com\/knowledge-base\/articles\/"},{"@type":"ListItem","position":3,"name":"How to Use Hidden and Calculated Field Types"}]},{"@type":"WebSite","@id":"https:\/\/crocoblock.com\/knowledge-base\/#website","url":"https:\/\/crocoblock.com\/knowledge-base\/","name":"Help Center","description":"","publisher":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/crocoblock.com\/knowledge-base\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/crocoblock.com\/knowledge-base\/#organization","name":"Help Center","url":"https:\/\/crocoblock.com\/knowledge-base\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/crocoblock.com\/knowledge-base\/#\/schema\/logo\/image\/","url":"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/04\/invert-crocoblock-logo.svg","contentUrl":"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/04\/invert-crocoblock-logo.svg","caption":"Help Center"},"image":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/article\/7331"}],"collection":[{"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/article"}],"about":[{"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/types\/article"}],"author":[{"embeddable":true,"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/users\/11"}],"wp:attachment":[{"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/media?parent=7331"}],"wp:term":[{"taxonomy":"builder-category","embeddable":true,"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/builder-category?post=7331"},{"taxonomy":"article-category","embeddable":true,"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/article-category?post=7331"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}