{"id":1921,"date":"2023-12-10T11:02:04","date_gmt":"2023-12-10T11:02:04","guid":{"rendered":"https:\/\/wpshortcode.org\/?p=1921"},"modified":"2023-12-10T11:02:05","modified_gmt":"2023-12-10T11:02:05","slug":"piotnetforms","status":"publish","type":"post","link":"https:\/\/wpshortcode.org\/piotnetforms\/","title":{"rendered":"Piotnet Forms Shortcode"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Below, you&#8217;ll find a detailed guide on how to add the <strong>Piotnet Forms Shortcode<\/strong> to your WordPress website, including its <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 Piotnet Forms Plugin shortcode 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 Piotnet Forms 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\/piotnetforms\/assets\/icon-128x128.png?rev=2384156\" 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\/piotnetforms\" target=\"_blank\" rel=\"noopener\">\n                        Piotnet Forms                    <\/a>\n\n\n                <!-- Plugin Description -->\n                <p class=\"plugin-description\">\n                    &quot;Piotnet Forms is a powerful WordPress plugin that simplifies the process of creating, customizing, and managing forms. Ideal for beginners and advanced users, it&#039;s a must-have for interactive sites.&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\u2729<\/span> (14)\n            <\/span>\n            <span class=\"plugin-active-installs\">\n                <strong>Active Installs<\/strong>: 4000+\n            <\/span>\n            <span class=\"plugin-tested\">\n                <strong>Tested with<\/strong>: 6.0.6            <\/span>\n            <span class=\"plugin-php-version\">\n                <strong>PHP Version<\/strong>: 5.4            <\/span>\n        <\/div>\n\n        <!-- List of Included Shortcodes -->\n        <div class=\"plugin-shortcodes\">\n            <strong>Included Shortcodes:<\/strong>\n            <ul>\n                <li>[piotnetforms]<\/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\">Piotnet Forms [piotnetforms] Shortcode<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Piotnet Forms shortcode is a tool that dynamically generates form content. It retrieves form data from a specific post ID, decodes the JSON data, and renders the form content. \n\n \n\nIt also manages the form&#8217;s styling by enqueuing the relevant CSS file. Additionally, it enqueues necessary scripts for functionality. The shortcode ends by returning the generated content.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode<\/strong>: <code>[piotnetforms]<\/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 piotnetforms shortcode parameters and attributes:<\/p>\n\n\n<ul>\n<li><code>id<\/code> &#8211; Unique identifier for specific contact form data<\/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; The basic usage of the shortcode to display a form by referencing its unique ID.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[piotnetforms id=1 \/]<\/code><\/pre>\n\n\n<p><strong>Advanced examples<\/strong><\/p>\n<p>Displaying a form with a custom CSS file. The CSS file will be loaded from the piotnetforms\/css\/ directory in the WordPress uploads folder.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[piotnetforms id=1 css_file=\"custom.css\" \/]<\/code><\/pre>\n\n\n<p>Using the shortcode to display a form by referencing both ID and a custom CSS file. The form will first try to load by ID, and then apply the custom CSS file.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[piotnetforms id=1 css_file=\"custom.css\" \/]<\/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>[piotnetforms]<\/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( 'piotnetforms', 'piotnetforms_shortcode' );<\/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 piotnetforms_shortcode( $args, $content ) {\n\tob_start();\n\tif ( ! empty( $args&#91;&#039;id&#039;] ) ) {\n\t\t$post_id         = $args&#91;&#039;id&#039;];\n\t\t$raw_data = get_post_meta( $post_id, &#039;_piotnetforms_data&#039;, true );\n\t\tif ( ! empty( $raw_data ) ) {\n\t\t\techo &#039;&lt;div id=&quot;piotnetforms&quot; class=&quot;piotnetforms&quot; data-piotnetforms-shortcode-id=&quot;&#039; . esc_attr( $post_id ) . &#039;&quot;&gt;&#039;;\n\t\t\t$data = json_decode( $raw_data, true );\n\t\t\t$widget_content = $data&#91;&#039;content&#039;];\n\t\t\t@piotnetforms_render_loop( $widget_content, $post_id );\n\n\t\t\t$upload = wp_upload_dir();\n\t\t\t$upload_dir = $upload&#91;&#039;baseurl&#039;];\n\t\t\t$upload_dir = $upload_dir . &#039;\/piotnetforms\/css\/&#039;;\n\n\t\t\t$css_file = $upload_dir . $post_id . &quot;.css&quot;;\n\t\t\twp_enqueue_style( &#039;piotnetforms-style-&#039; . $post_id, $css_file, &#91;], get_post_meta( $post_id, &#039;_piotnet-revision-version&#039;, true ) );\n\t\t\techo &#039;&lt;\/div&gt;&#039;;\n\t\t\twp_add_inline_script( &#039;main-asasasdasd&#039;, &#039;alert(&quot;hello world&quot;);&#039; );\n\t\t\twp_enqueue_script( &#039;main-asasasdasd&#039; );\n\t\t\twp_enqueue_script( &#039;piotnetforms-script&#039; );\n\t\t\twp_enqueue_style( &#039;piotnetforms-style&#039; );\n\t\t}\n\t}\n\treturn 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\">piotnetforms\/piotnetforms\/inc\/shortcode\/shortcode-widget.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>Piotnet Forms Plugin shortcode<\/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 Piotnet Forms Shortcode to your WordPress website, including its parameters, examples, and PHP function code. Additionally, we&#8217;ll assist you with common issues that might cause the Piotnet Forms Plugin shortcode 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":"Piotnet Forms","slug":"","version":"1.0.25","author":"<a href=\"https:\/\/piotnet.com\/\">Piotnet<\/a>","icons":"https:\/\/ps.w.org\/piotnetforms\/assets\/icon-128x128.png?rev=2384156","plugin_tags":"{\"form-builder\":\"form builder\",\"piotnet\":\"piotnet\",\"piotnet-forms\":\"piotnet forms\"}","author_profile":"https:\/\/profiles.wordpress.org\/piotnetdotcom\/","requires":"4.7","tested":"6.0.6","requires_php":"5.4","rating":84,"num_ratings":14,"active_installs":4000,"downloaded":34747,"last_updated":"2022-11-09 3:52am GMT","added":"2020-09-18","homepage":"https:\/\/piotnetforms.com\/","short_description":"Piotnet Forms - Highly Customizable WordPress Form Builder","description":"\"Piotnet Forms is a powerful WordPress plugin that simplifies the process of creating, customizing, and managing forms. Ideal for beginners and advanced users, it's a must-have for interactive sites.\"","shortcodes":"[\"piotnetforms\"]","footnotes":""},"categories":[1],"tags":[],"class_list":["post-1921","post","type-post","status-publish","format-standard","hentry","category-plugins"],"_links":{"self":[{"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/posts\/1921","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=1921"}],"version-history":[{"count":1,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/posts\/1921\/revisions"}],"predecessor-version":[{"id":2473,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/posts\/1921\/revisions\/2473"}],"wp:attachment":[{"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/media?parent=1921"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/categories?post=1921"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/tags?post=1921"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}