Home › Forums › Front-end Issues › Create Front End Form using Shortcode › Reply To: Create Front End Form using Shortcode
Hey!
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.
Example:
[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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.