Title: Multiple Front End Forms
Last modified: August 31, 2016

---

# Multiple Front End Forms

 *  Resolved [Michael Bishop](https://wordpress.org/support/users/miklb/)
 * (@miklb)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/multiple-front-end-forms/)
 * I’m using the example [here](https://webdevstudios.com/2015/03/30/use-cmb2-to-create-a-new-post-submission-form/)
   to use shortcodes to build multiple front end forms. However, only the 1st form
   I call from my plugin will post to the correct CPT. Everything else defaults 
   to a standard post and draft status, even though I’m setting the attribute to`
   post_status' => 'publish',`. I even tried overriding the status and `post_type`
   in the short code.
 * The form display fine on front end and saves, just as I said, not to its CPT.
 * All of my functions are named differently, no apparent PHP errors.
 * Any insight greatly appreciated.
 * [https://wordpress.org/plugins/cmb2/](https://wordpress.org/plugins/cmb2/)

Viewing 5 replies - 16 through 20 (of 20 total)

[←](https://wordpress.org/support/topic/multiple-front-end-forms/?output_format=md)
[1](https://wordpress.org/support/topic/multiple-front-end-forms/?output_format=md)
2

 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [10 years, 4 months ago](https://wordpress.org/support/topic/multiple-front-end-forms/page/2/#post-7244259)
 * The odd part about that line is that if you’re reaching that unset part, then
   the previous contents from `$_POST['atts']` should now be in your `$post_data`
   variable, ready to be passed into the `wp_insert_post()` down on line 520
 *  Thread Starter [Michael Bishop](https://wordpress.org/support/users/miklb/)
 * (@miklb)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/multiple-front-end-forms/page/2/#post-7244260)
 * I truthfully can’t explain it unless `cmb2_after_init` is loading on every page
   load, thus the 1st call to it (paper in my case) blocks the subsequent attempts
   to set the attributes.
 *  All I know is I commented out those lines in all of my CPT & was able to create
   new posts on the front end with no *apparent* issues.
 * This is a mu-plugin in a multi-site install (which I think I failed to mention)
   but wouldn’t think that would make a difference.
 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [10 years, 4 months ago](https://wordpress.org/support/topic/multiple-front-end-forms/page/2/#post-7244287)
 * If you’re satisfied with what you have now, I may carry on. If you still need
   me checking on anything, let me know.
 * You did mention the mu part and I was emulating that part. The Multisite detail
   wasn’t mentioned previously though. I don’t think that’s going to play a part
   in it at all, since $_POST won’t care.
 *  Thread Starter [Michael Bishop](https://wordpress.org/support/users/miklb/)
 * (@miklb)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/multiple-front-end-forms/page/2/#post-7244289)
 * Yes, it is working for me. Didn’t know if you had any thoughts on why it might
   be firing on other pages, but I can mark this resolved. I’ll leave the gist out
   there in case someone else comes along with a similar problem.
 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [10 years, 4 months ago](https://wordpress.org/support/topic/multiple-front-end-forms/page/2/#post-7244290)
 * Good enough for me. 😀 thanks.

Viewing 5 replies - 16 through 20 (of 20 total)

[←](https://wordpress.org/support/topic/multiple-front-end-forms/?output_format=md)
[1](https://wordpress.org/support/topic/multiple-front-end-forms/?output_format=md)
2

The topic ‘Multiple Front End Forms’ is closed to new replies.

 * ![](https://ps.w.org/cmb2/assets/icon.svg?rev=2866672)
 * [CMB2](https://wordpress.org/plugins/cmb2/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cmb2/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cmb2/)
 * [Active Topics](https://wordpress.org/support/plugin/cmb2/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cmb2/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cmb2/reviews/)

 * 20 replies
 * 2 participants
 * Last reply from: [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/multiple-front-end-forms/page/2/#post-7244290)
 * Status: resolved