Home › Forums › Front-end Issues › Create Front End Form using Shortcode › Reply To: Create Front End Form using Shortcode
Bit older topic but I thought I’d share this plugin for future googlers etc.
We needed the ability to add acf_form as a shortcode in a project we’re working on so I just coded a plugin that achieves this. It’s completely self-reliant so no need to add
acf_form_head yourself and it only adds it if there’s a shortcode in the post_content.
To use it just install it like any other plugin and then use
[show_acf_form] in the editor (currently only supports the regular post_content editor).
It takes *all* options that
acf_form takes. To set array values just comma-separate them. To set associative array values use | to separate key=>value pairs.
[show_acf_form id="tavlingsansokan-form" field_groups="1496,1451" post_id="new_post" new_post="post_type|tavlingsansokningar,post_status|publish" submit_value="Skicka" updated_message="Ansökan mottagen"]
It can be found here: https://github.com/jonathan-dejong/acf-form-shortcode
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
🚨 The 2023 ACF Annual Survey closes tomorrow! This is your last chance to complete the survey and help guide the evolution of ACF. https://t.co/0cgr9ZFOJ5— Advanced Custom Fields (@wp_acf) May 18, 2023
© 2023 Advanced Custom Fields.