{"id":2249,"date":"2024-03-01T10:00:03","date_gmt":"2024-03-01T10:00:03","guid":{"rendered":"https:\/\/wpshortcode.org\/?p=2249"},"modified":"2024-03-01T10:00:04","modified_gmt":"2024-03-01T10:00:04","slug":"bit-form","status":"publish","type":"post","link":"https:\/\/wpshortcode.org\/bit-form\/","title":{"rendered":"Bit Form Shortcodes"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Below, you&#8217;ll find a detailed guide on how to add the <strong>Bit Form Shortcodes<\/strong> to your WordPress website, including their <strong>parameters<\/strong>, <strong>examples<\/strong>, and <strong>PHP function code<\/strong>. Additionally, we&#8217;ll assist you with common issues that might cause the Bit Form Plugin shortcodes not to show or not to work correctly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Before starting, here is an overview of the Bit Form Plugin and the shortcodes it provides:<\/p>\n\n\n<p>    <div class=\"plugin-info-box\">\n        <div class=\"top-main\">\n            <!-- SVG Image -->\n            <div class=\"plugin-image\">\n                <img decoding=\"async\" src=\"https:\/\/ps.w.org\/bit-form\/assets\/icon-128x128.gif?rev=2947008\" alt=\"Plugin Icon\" \/>\n            <\/div>\n            \n            <div class=\"plugin-descriptive-part\">\n                <!-- Plugin Name with Link -->\n\n                    <a class=\"plugin-title\" href=\"https:\/\/wordpress.org\/plugins\/bit-form\" target=\"_blank\" rel=\"noopener\">\n                        Contact Form Builder by Bit Form &#8211; Easiest Multi Step Contact Form, Payment Form, Calculator Form Builder Plugin for WordPress                    <\/a>\n\n\n                <!-- Plugin Description -->\n                <p class=\"plugin-description\">\n                    &quot;Contact Form Builder by Bit Form is a versatile WordPress plugin. Easily create multi-step contact forms, payment forms and calculator forms. Simplify user interaction and data collection on your website.&quot;                <\/p>\n            <\/div>\n        <\/div>\n\n        <!-- Rating and Additional Info -->\n        <div class=\"plugin-meta\">\n            <span class=\"plugin-rating\">\n                <span class='stars'>\u2605\u2605\u2605\u2605\u2606<\/span> (49)\n            <\/span>\n            <span class=\"plugin-active-installs\">\n                <strong>Active Installs<\/strong>: 2000+\n            <\/span>\n            <span class=\"plugin-tested\">\n                <strong>Tested with<\/strong>: 6.3.2            <\/span>\n            <span class=\"plugin-php-version\">\n                <strong>PHP Version<\/strong>: 5.6            <\/span>\n        <\/div>\n\n        <!-- List of Included Shortcodes -->\n        <div class=\"plugin-shortcodes\">\n            <strong>Included Shortcodes:<\/strong>\n            <ul>\n                <li>[bitforms-frontend-file]<\/li><li>[bitform]<\/li>            <\/ul>\n        <\/div>\n    <\/div>\n    <\/p>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Bit Form [bitforms-frontend-file] Shortcode<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The BitForms Frontend File shortcode is a functional tool in PHP coding. It handles file downloads in WordPress by checking if the formID, entryID, and fileID are set. \n\n\n\nIf these are not set, it will return a 404 error. It also sanitizes the input for security. If the file path is readable, it initiates the file download or view. This shortcode ensures secure and efficient file handling.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode<\/strong>: <code>[bitforms-frontend-file]<\/code><\/p>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Parameters<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Here is a list of all possible bitforms-frontend-file shortcode parameters and attributes:<\/p>\n\n\n<ul>\n<li><code>formID<\/code> &#8211; The unique identifier of the form<\/li>\n<li><code>entryID<\/code> &#8211; The unique identifier of the entry in the form<\/li>\n<li><code>fileID<\/code> &#8211; The unique identifier of the file to be downloaded<\/li>\n<\/ul>\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Examples and Usage<\/h3>\n\n\n<p><strong>Basic example<\/strong> &#8211; A simple shortcode usage to download a file using the form ID, entry ID, and file ID.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[bitforms-frontend-file formID=1 entryID=2 fileID=\"sample.pdf\" \/]<\/code><\/pre>\n\n\n<p><strong>Advanced examples<\/strong><\/p>\n<p>In this advanced example, we are using the shortcode to download a file using the form ID, entry ID, and file ID. However, if the file is not found, a 404 error page will be displayed.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[bitforms-frontend-file formID=3 entryID=4 fileID=\"notfound.pdf\" \/]<\/code><\/pre>\n\n\n<p>In another advanced example, we are using a different form ID and entry ID to download a different file.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[bitforms-frontend-file formID=5 entryID=6 fileID=\"different.pdf\" \/]<\/code><\/pre>\n\n\n<p>Note that in all these examples, the formID, entryID, and fileID are parameters that you need to replace with actual values based on your use case. The formID and entryID should be integers, while the fileID should be the name of the file you want to download.<\/p>\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">PHP Function Code<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In case you have difficulties debugging what causing issues with <code>[bitforms-frontend-file]<\/code> shortcode, check below the related PHP functions code.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode line<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add_shortcode('bitforms-frontend-file', [$this, 'handleFileDownload']);<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode PHP function<\/strong>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; light: false; title: ; toolbar: true; notranslate\" title=\"\">\nfunction handleFileDownload()\n  {\n    if (!isset($_GET&#91;&#039;formID&#039;]) || !isset($_GET&#91;&#039;entryID&#039;]) || !isset($_GET&#91;&#039;fileID&#039;])) {\n      global $wp_query;\n      $wp_query-&gt;set_404();\n      status_header(404);\n      get_template_part(404);\n      exit();\n    }\n    $formID = intval(sanitize_text_field($_GET&#91;&#039;formID&#039;]));\n    $entryID = intval(sanitize_text_field($_GET&#91;&#039;entryID&#039;]));\n    $fileID = sanitize_file_name($_GET&#91;&#039;fileID&#039;]);\n    $filePath = BITFORMS_UPLOAD_DIR . DIRECTORY_SEPARATOR . $formID . DIRECTORY_SEPARATOR . $entryID . DIRECTORY_SEPARATOR . $fileID;\n    if (is_readable($filePath)) {\n      $this-&gt;fileDownloadORView($filePath, true);\n    }\n  }\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>Code file location<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">bit-form\/bit-form\/includes\/Core\/Util\/FileDownloadProvider.php<\/code><\/pre>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Bit Form [bitform] Shortcode<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Bitform shortcode is a powerful tool that manages the rendering of forms on the frontend. It allows users to insert specific forms into their posts or pages using a unique form ID. \n\n\n\nThe shortcode also checks if the form exists, is active, and handles form abandonment. It sets up Google reCAPTCHA, handles field values, and manages form layouts. It also validates form fields on focus loss and maintains step history for multi-step forms.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode<\/strong>: <code>[bitform]<\/code><\/p>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Parameters<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Here is a list of all possible bitform shortcode parameters and attributes:<\/p>\n\n\n<ul>\n<li><code>form_id<\/code> &#8211; Identifies the specific form to be used<\/li>\n<li><code>entry_id<\/code> &#8211; Identifies the specific entry in the form<\/li>\n<li><code>id<\/code> &#8211; Another way to identify the specific form to be used<\/li>\n<li><code>form_preview<\/code> &#8211; When set, allows the form to be previewed before submission<\/li>\n<\/ul>\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Examples and Usage<\/h3>\n\n\n<p><strong>Basic example<\/strong> &#8211; Display a Bit-form by referencing its ID.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[bitform form_id=1 \/]<\/code><\/pre>\n\n\n<p><strong>Advanced example 1<\/strong> &#8211; Display a Bit-form by referencing its ID and also provide an entry ID. The form will first try to load by form ID and then load the specific entry by its ID.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[bitform form_id=1 entry_id=2 \/]<\/code><\/pre>\n\n\n<p><strong>Advanced example 2<\/strong> &#8211; Display a Bit-form by referencing its ID and preview the form. The form will load by form ID and it will be in preview mode.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[bitform form_id=1 form_preview=true \/]<\/code><\/pre>\n\n\n<p><strong>Advanced example 3<\/strong> &#8211; Display a Bit-form by referencing its ID and also provide a different ID. The form will first try to load by form ID, but if not found, it will try to load by the alternative ID.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[bitform form_id=1 id=2 \/]<\/code><\/pre>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">PHP Function Code<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In case you have difficulties debugging what causing issues with <code>[bitform]<\/code> shortcode, check below the related PHP functions code.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode line<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add_shortcode('bitform', [$this, 'handleFrontendRenderRequest']);<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode PHP function<\/strong>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; light: false; title: ; toolbar: true; notranslate\" title=\"\">\nfunction handleFrontendRenderRequest($atts)\n  {\n    $formPreview = isset($atts&#91;&#039;form_preview&#039;]) ? $atts&#91;&#039;form_preview&#039;] : false;\n    if (isset($atts&#91;&#039;form_id&#039;])) {\n      $formID = intval($atts&#91;&#039;form_id&#039;]);\n    }\n    if (isset($atts&#91;&#039;entry_id&#039;])) {\n      $entryId = intval($atts&#91;&#039;entry_id&#039;]);\n    } else {\n      $entryId = false;\n    }\n    if (isset($atts&#91;&#039;id&#039;])) {\n      $atts = shortcode_atts(&#91;&#039;id&#039; =&gt; 0], $atts);\n      $formID = intval($atts&#91;&#039;id&#039;]);\n    }\n\n    if (!$formID) {\n      return __(&#039;Form ID cannot be empty&#039;, &#039;bit-form&#039;);\n    }\n\n    if (!$this-&gt;isExist($formID)) {\n      return sprintf(__(&#039;#%s no. Form doesn\\&#039;t exists&#039;, &#039;bit-form&#039;), $formID);\n    }\n\n    \/\/ check for abandoned form entry id\n    $isAbandoned = false;\n    if (empty($entryId) &amp;&amp; Utilities::isPro() &amp;&amp; class_exists(&#039;\\BitCode\\BitFormPro\\Admin\\FormSettings\\FormAbandonment&#039;)) {\n      $FormAbandonment = new FormAbandonment($formID);\n      $isAbandoned = $FormAbandonment-&gt;checkAbandonedFormEntryId();\n    }\n\n    FrontendHelpers::setBfFrontendFormIds($formID);\n    $bfFrontendFormIds = FrontendHelpers::$bfFrontendFormIds;\n    $shortCodeCounter = count($bfFrontendFormIds);\n    $FrontendFormManager = new FrontendFormManager($formID, $shortCodeCounter);\n\n    if (!$FrontendFormManager-&gt;checkStatus()) {\n      return  sprintf(__(&#039;#%s no. Form is not active&#039;, &#039;bit-form&#039;), $formID);\n    }\n    ob_start();\n    $this-&gt;loadAssets($formID);\n\n    $font = $FrontendFormManager-&gt;getFont();\n\n    if ($font &amp;&amp; !$formPreview) {\n      wp_enqueue_style(&#039;bf-google-font&#039;, $font, &#039;1.0.0&#039;, true);\n    }\n\n    if (!empty($_GET&#91;&#039;token&#039;]) &amp;&amp; !empty($_GET&#91;&#039;id&#039;])) {\n      $this-&gt;validPassowordResetToken($_GET&#91;&#039;token&#039;], $_GET&#91;&#039;id&#039;], $formID);\n    }\n\n    $previousValue = $this-&gt;getValuesFromQueryParams();\n    $errorMessages = &#91;]; \/\/ delete\n    $FormIdentifier = esc_js($FrontendFormManager-&gt;getFormIdentifier());\n    $nonce = $FrontendFormManager-&gt;getFormToken();\n    $file = count($FrontendFormManager-&gt;getUploadFields()) &gt; 0 ? $FrontendFormManager-&gt;getUploadFields() : false;\n\n    $FrontendFormManager-&gt;setViewCount();\n\n    $formContent = $FrontendFormManager-&gt;getFormContentWithValue($previousValue);\n    $fields = $formContent-&gt;fields;\n    $layout = $formContent-&gt;layout;\n    $nestedLayout = $formContent-&gt;nestedLayout;\n    $buttons = !empty($formContent-&gt;buttons) ? $formContent-&gt;buttons : &#039;&#039;;\n    $additional = $formContent-&gt;additional;\n\n    $workFlowRunType = $entryId ? &#039;edit&#039; : &#039;create&#039;;\n    if ($entryId) {\n      $fields = $this-&gt;setFieldsValue($fields, $formID, $entryId);\n    }\n\n    $fields = $this-&gt;triggerWorkflowOnLoad($formID, $shortCodeCounter, $fields, $workFlowRunType);\n    $workFlowreturnedOnUserInput = $this-&gt;executeOnUserInput($formID, $shortCodeCounter, $fields);\n\n    \/\/ test for form before remove\n    $noLabel = &#91;&#039;decision-box&#039;, &#039;html&#039;, &#039;button&#039;, &#039;paypal&#039;, &#039;razorpay&#039;, &#039;recaptcha&#039;];\n    foreach ($fields as $fldKey =&gt; $field) {\n      if (!in_array($field-&gt;typ, $noLabel) &amp;&amp; isset($field-&gt;lbl)) {\n        $lblReplaceToBackslash = str_replace(&#039;$_bf_$&#039;, &#039;\\\\&#039;, $field-&gt;lbl);\n        $fields-&gt;{$fldKey}-&gt;lbl = FieldValueHandler::replaceSmartTagWithValue($lblReplaceToBackslash);\n      }\n    }\n    $fieldsKey = $FrontendFormManager-&gt;getFieldsKey();\n\n    $captchaV3Settings = $FrontendFormManager-&gt;getCaptchaV3Settings();\n    if ($FrontendFormManager-&gt;getCaptchaSettings() || $captchaV3Settings) {\n      $integrationHandler = new IntegrationHandler(0);\n      $allFormIntegrations = $integrationHandler-&gt;getAllIntegration(&#039;app&#039;);\n      if (!is_wp_error($allFormIntegrations)) {\n        foreach ($allFormIntegrations as $integration) {\n          if (\n            $FrontendFormManager-&gt;getCaptchaSettings()\n            &amp;&amp; !is_null($integration-&gt;integration_type)\n            &amp;&amp; &#039;gReCaptcha&#039; === $integration-&gt;integration_type\n          ) {\n            $integrationDetails = json_decode($integration-&gt;integration_details);\n            $integrationDetails-&gt;id = $integration-&gt;id;\n            $reCAPTCHA = $integrationDetails;\n            $reCAPTCHAVersion = &#039;v2&#039;;\n          }\n\n          if ($captchaV3Settings) {\n            if (!is_null($integration-&gt;integration_type) &amp;&amp; &#039;gReCaptchaV3&#039; === $integration-&gt;integration_type) {\n              $integrationDetails = json_decode($integration-&gt;integration_details);\n              $integrationDetails-&gt;id = $integration-&gt;id;\n              $reCAPTCHA = $integrationDetails;\n              $reCAPTCHAVersion = &#039;v3&#039;;\n            }\n          }\n        }\n      }\n    }\n\n    if ($captchaV3Settings &amp;&amp; !empty($reCAPTCHA-&gt;siteKey)) {\n      \/\/ DANGER: no matter what, DONT CHANGE THE SCRIPT ID OF THIS SCRIPT\n      $scriptId = BITFORMS_PREFIX . &#039;recaptcha&#039;;\n      wp_enqueue_script($scriptId, &quot;https:\/\/www.google.com\/recaptcha\/api.js?render={$reCAPTCHA-&gt;siteKey}&quot;);\n    }\n\n    $configs = &#91;\n      &#039;bf_separator&#039; =&gt; BITFORMS_BF_SEPARATOR,\n    ];\n\n    \/\/ check if fields has paypal or razorpay\n    $paymentFields = &#91;&#039;paypal&#039;, &#039;razorpay&#039;, &#039;stripe&#039;];\n    $paymentFieldData = &#91;];\n    foreach ($fields as $key =&gt; $field) {\n      if (in_array($field-&gt;typ, $paymentFields)) {\n        $paymentFieldData&#91;$key] = $field;\n      }\n    }\n\n    if (!empty($paymentFieldData)) {\n      $integrationHandler = new IntegrationHandler(0);\n      foreach ($paymentFieldData as $fldKey =&gt; $fldData) {\n        if (&#039;paypal&#039; === $fldData-&gt;typ) {\n          $paypalIntegration = $integrationHandler-&gt;getAIntegration($fldData-&gt;payIntegID);\n          $integrationDetails = json_decode($paypalIntegration&#91;0]-&gt;integration_details);\n          $clientID = $integrationDetails-&gt;clientID;\n          $fields-&gt;{$fldKey}-&gt;clientId = $clientID;\n        } elseif (&#039;razorpay&#039; === $fldData-&gt;typ) {\n          $razorpayIntegration = $integrationHandler-&gt;getAIntegration($fldData-&gt;payIntegID);\n          $integrationDetails = json_decode($razorpayIntegration&#91;0]-&gt;integration_details);\n          $clientID = $integrationDetails-&gt;apiKey;\n          $fields-&gt;{$fldKey}-&gt;clientId = $clientID;\n        } elseif (&#039;stripe&#039; === $fldData-&gt;typ) {\n          $stripeIntegration = $integrationHandler-&gt;getAIntegration($fldData-&gt;payIntegID);\n          $integrationDetails = json_decode($stripeIntegration&#91;0]-&gt;integration_details);\n          $publishableKey = $integrationDetails-&gt;publishableKey;\n          $fields-&gt;{$fldKey}-&gt;publishableKey = $publishableKey;\n        }\n      }\n    }\n\n    $bitFormFrontArr = &#91;\n      &#039;ajaxURL&#039;                        =&gt; admin_url(&#039;admin-ajax.php&#039;),\n      &#039;nonce&#039;                          =&gt; $nonce,\n      &#039;version&#039;                        =&gt; BITFORMS_VERSION,\n      &#039;layout&#039;                         =&gt; $layout,\n      &#039;nestedLayout&#039;                   =&gt; $nestedLayout,\n      &#039;fields&#039;                         =&gt; $fields,\n      &#039;buttons&#039;                        =&gt; $buttons,\n      &#039;fieldsKey&#039;                      =&gt; $fieldsKey,\n      &#039;file&#039;                           =&gt; $file,\n      &#039;configs&#039;                        =&gt; $configs,\n      &#039;formId&#039;                         =&gt; $formID,\n      &#039;appID&#039;                          =&gt; &quot;bitforms_{$formID}&quot;,\n      &#039;GCLID&#039;                          =&gt; $FrontendFormManager-&gt;isGCLIDEnabled(),\n      &#039;assetUrl&#039;                       =&gt; BITFORMS_ASSET_URI,\n      &#039;onfieldCondition&#039;               =&gt; !empty($workFlowreturnedOnUserInput&#91;&#039;onfield_input_conditions&#039;]) ? $workFlowreturnedOnUserInput&#91;&#039;onfield_input_conditions&#039;] : false,\n      &#039;smartTags&#039;                      =&gt; !empty($workFlowreturnedOnUserInput&#91;&#039;smart_tags&#039;]) ? $workFlowreturnedOnUserInput&#91;&#039;smart_tags&#039;] : &#91;],\n      &#039;paymentCallbackUrl&#039;             =&gt; get_rest_url() . &#039;bitform\/v1\/payments\/razorpay&#039;,\n      &#039;gRecaptchaSiteKey&#039;              =&gt; !empty($reCAPTCHA-&gt;siteKey) ? $reCAPTCHA-&gt;siteKey : null,\n      &#039;gRecaptchaVersion&#039;              =&gt; !empty($reCAPTCHAVersion) ? $reCAPTCHAVersion : null,\n    ];\n\n    if ($entryId) {\n      $bitFormFrontArr&#91;&#039;entryId&#039;] = $entryId;\n    }\n\n    if (isset($additional-&gt;enabled-&gt;validateFocusLost)) {\n      $bitFormFrontArr&#91;&#039;validateFocusLost&#039;] = true;\n    }\n\n    if (!empty($isAbandoned)) {\n      $bitFormFrontArr&#91;&#039;oldValues&#039;] = $this-&gt;getFieldsValue($formID, $isAbandoned);\n      if (empty($entryId)) {\n        $bitFormFrontArr&#91;&#039;entryId&#039;] = $isAbandoned;\n      }\n    }\n\n    if (is_array($layout) &amp;&amp; count($layout) &gt; 1) {\n      $formInfo = $FrontendFormManager-&gt;getFormInfo();\n      $multiStepSettings = isset($formInfo-&gt;multiStepSettings) ? $formInfo-&gt;multiStepSettings : null;\n      $newTempSettings = (object) &#91;\n        &#039;validateOnStepChange&#039; =&gt; isset($multiStepSettings-&gt;validateOnStepChange) ? $multiStepSettings-&gt;validateOnStepChange : false,\n        &#039;maintainStepHistory&#039;  =&gt; isset($multiStepSettings-&gt;maintainStepHistory) ? $multiStepSettings-&gt;maintainStepHistory : false,\n        &#039;saveProgress&#039;         =&gt; isset($multiStepSettings-&gt;saveProgress) ? $multiStepSettings-&gt;saveProgress : false,\n        &#039;showPercentage&#039;       =&gt; isset($multiStepSettings-&gt;progressSettings-&gt;showPercentage) ? $multiStepSettings-&gt;progressSettings-&gt;showPercentage : false,\n      ];\n      $bitFormFrontArr&#91;&#039;formInfo&#039;] = (object) &#91;\n        &#039;multiStepSettings&#039; =&gt; $newTempSettings\n      ];\n    }\n\n    $bitFormsFront = apply_filters(\n      &#039;bitforms_localized_script&#039;,\n      $bitFormFrontArr\n    );\n\n    $layout = \\json_encode($layout);\n    $buttons = \\json_encode($buttons);\n    $frontArr = json_encode($bitFormFrontArr);\n\n    $bfGlobals = &lt;&lt;&lt;BFGLOBALS\n      if(!window.bf_globals) { \n        window.bf_globals = {} \n      } if(!window.bf_globals.{$FormIdentifier}) { \n        window.bf_globals.{$FormIdentifier} = {} \n      }\n      if(document.getElementById(&#039;{$FormIdentifier}&#039;)) {\n        window.bf_globals.{$FormIdentifier} = {...window.bf_globals.{$FormIdentifier}, ...{$frontArr}};\n      }\nBFGLOBALS;\n    $this-&gt;addInlineScript($bfGlobals, &#039;bit-form-all-script&#039;, &#039;before&#039;);\n\n    $html = $FrontendFormManager-&gt;formView($fields, $file, $errorMessages);\n\n    \/\/ if form preview then return html otherwise echo with output buffer\n    if ($formPreview) {\n      ob_clean();\n      $formViewObject = new \\stdClass();\n      $formViewObject-&gt;html = $html;\n      $formViewObject-&gt;font = $font;\n      $formViewObject-&gt;bfGlobals = $bfGlobals;\n      return $formViewObject;\n    }\n    echo trim($html);\n    return ob_get_clean();\n  }\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>Code file location<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">bit-form\/bit-form\/includes\/Frontend\/Form\/FrontendFormHandler.php<\/code><\/pre>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Now that you&#8217;ve learned how to embed the <strong>Bit Form Plugin shortcodes<\/strong>, understood the parameters, and seen code examples, it&#8217;s easy to use and debug any issue that might cause it to &#8216;not work&#8217;. If you still have difficulties with it, don&#8217;t hesitate to leave a comment below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Below, you&#8217;ll find a detailed guide on how to add the Bit Form Shortcodes to your WordPress website, including their parameters, examples, and PHP function code. Additionally, we&#8217;ll assist you with common issues that might cause the Bit Form Plugin shortcodes not to show or not to work correctly. Before starting, here is an overview [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"name":"Contact Form Builder by Bit Form &#8211; Easiest Multi Step Contact Form, Payment Form, Calculator Form Builder Plugin for WordPress","slug":"","version":"2.5.2","author":"<a href=\"https:\/\/www.bitapps.pro\">Contact Form Builder Plugin - Bit Form<\/a>","icons":"https:\/\/ps.w.org\/bit-form\/assets\/icon-128x128.gif?rev=2947008","plugin_tags":"{\"contact-form\":\"contact form\",\"contact-form-builder\":\"contact form builder\",\"form\":\"form\",\"multi-step-forms\":\"multi step forms\",\"wordpress-contact-form-plugin\":\"wordpress contact form plugin\"}","author_profile":"https:\/\/profiles.wordpress.org\/bitpressadmin\/","requires":"5.0","tested":"6.3.2","requires_php":"5.6","rating":98,"num_ratings":49,"active_installs":2000,"downloaded":67826,"last_updated":"2023-09-25 10:02am GMT","added":"2020-09-05","homepage":"https:\/\/www.bitapps.pro\/bit-form","short_description":"WordPress Contact Form Builder Plugin with Drag &amp; Drop online form builder to create Multi Step WP Contact forms, Payment forms, Order forms, Calc &hellip;","description":"\"Contact Form Builder by Bit Form is a versatile WordPress plugin. Easily create multi-step contact forms, payment forms and calculator forms. Simplify user interaction and data collection on your website.\"","shortcodes":"[\"bitforms-frontend-file\",\"bitform\"]","footnotes":""},"categories":[1],"tags":[],"class_list":["post-2249","post","type-post","status-publish","format-standard","hentry","category-plugins"],"_links":{"self":[{"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/posts\/2249","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/comments?post=2249"}],"version-history":[{"count":1,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/posts\/2249\/revisions"}],"predecessor-version":[{"id":2771,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/posts\/2249\/revisions\/2771"}],"wp:attachment":[{"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/media?parent=2249"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/categories?post=2249"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/tags?post=2249"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}