{"id":848,"date":"2020-05-04T18:39:49","date_gmt":"2020-05-04T18:39:49","guid":{"rendered":"https:\/\/fluentforms.com\/?post_type=docs&#038;p=848"},"modified":"2023-07-25T06:59:02","modified_gmt":"2023-07-25T06:59:02","password":"","slug":"fluentform_before_form_render","status":"publish","type":"docs","link":"https:\/\/fluentforms.com\/docs\/fluentform_before_form_render\/","title":{"rendered":"fluentform\/before_form_render"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Description<\/h2>\n\n\n\n<p>This action fires right before the form is rendered. If you want to do a certain task after a form rendering then you can catch this action hook and do your staff. For example, checking for some conditions on whether to show the form or not.<br><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php line-numbers\">\/*\n* Source Action\n*\/\ndo_action('fluentform\/before_form_render', $form);<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Usage<\/h2>\n\n\n\n<p>The following would apply to all forms:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php line-numbers\">add_action('fluentform\/before_form_render', 'your_custom_function', 10, 1);\n\nfunction your_custom_function( $form )\n{\n   \/\/ Do your stuffs here\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Parameters<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>$form<\/strong> (Object) <a href=\"https:\/\/fluentforms.com\/docs\/form-object\/\">The $form Object<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Placement<\/h2>\n\n\n\n<p>This code should be placed in the\u00a0<a href=\"http:\/\/codex.wordpress.org\/Theme_Development#Functions_File\" target=\"_blank\" rel=\"noopener\">functions.php<\/a>\u00a0file of your active theme. Also, you can use php snippet plugins.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Source Code<\/h2>\n\n\n\n<p>This hook is located in\u00a0fluentform\/app\/Services\/FormBuilder\/FormBuilder.php.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Description This action fires right before the form is rendered. If you want to do a certain task after a form rendering then you can catch this action hook and do your staff. For example, checking for some conditions on whether to show the form or not. Usage The following would apply to all forms:&#8230;<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"doc_category":[20],"doc_tag":[],"knowledge_base":[264],"class_list":["post-848","docs","type-docs","status-publish","hentry","doc_category-action-hooks","knowledge_base-developer-documentation"],"acf":[],"year_month":"2026-06","word_count":123,"total_views":"876","reactions":{"happy":"1","normal":"0","sad":"2"},"author_info":{"display_name":"Alex Sanchez","author_link":"https:\/\/fluentforms.com\/author\/alexwpmanageninja-com\/"},"doc_category_info":[{"term_name":"Action Hooks","term_url":"https:\/\/fluentforms.com\/docs\/developer-documentation\/action-hooks\/"}],"doc_tag_info":[],"taxonomy_info":{"doc_category":[{"value":20,"label":"Action Hooks"}],"knowledge_base":[{"value":264,"label":"Developer Documentation"}]},"featured_image_src_large":false,"comment_info":0,"knowledge_base_info":[{"term_name":"Developer Documentation","term_url":"https:\/\/fluentforms.com\/docs\/developer-documentation\/","term_slug":"developer-documentation"}],"knowledge_base_slug":["developer-documentation"],"_links":{"self":[{"href":"https:\/\/fluentforms.com\/wp-json\/wp\/v2\/docs\/848","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fluentforms.com\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/fluentforms.com\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/fluentforms.com\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/fluentforms.com\/wp-json\/wp\/v2\/comments?post=848"}],"version-history":[{"count":0,"href":"https:\/\/fluentforms.com\/wp-json\/wp\/v2\/docs\/848\/revisions"}],"wp:attachment":[{"href":"https:\/\/fluentforms.com\/wp-json\/wp\/v2\/media?parent=848"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/fluentforms.com\/wp-json\/wp\/v2\/doc_category?post=848"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/fluentforms.com\/wp-json\/wp\/v2\/doc_tag?post=848"},{"taxonomy":"knowledge_base","embeddable":true,"href":"https:\/\/fluentforms.com\/wp-json\/wp\/v2\/knowledge_base?post=848"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}