Support » Fixing WordPress » Preview a custom form before posting (no preview button exist)

  • Hi all!

    I just discovered that I posted this in the wrong forum so I’m re-posting it here..
    ___

    Hi all!

    I’ve created a custom form page, where unregistered user can write & upload an image, but I’ve not found anyway to allow them to preview the post before submitting it.

    This must be possible, however I’ve got no clue how…

    Anybody know anything about this?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator Steve Stern

    (@sterndata)

    Support Team Volunteer

    Are you using a plugin for this or have you coded the form directly?

    I’m not good enough for coding it.
    I’m using USP pro for the custom fields, and the layout is elementor pro.

    None of them do however have a preview post function.

    I have seen a few plugin for preview, but none that are for custom forms..

    Moderator bcworkz

    (@bcworkz)

    It’s unlikely you would find any plugin that can deal with custom elements, they have to assume a standard something in order to work. One cannot code for an unknown element. I think you either need to find a plugin that does it all or hire a coder to tie the disparate bits together for you.

    If you don’t have a coder you normally work with, you can find help at jobs.wordpress.net or jetpack.pro.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    @catsfoto1se You’re not asking a coding question, you’re using plugins and not doing any coding. That means this topic isn’t for Developing with WordPress and I’ve moved it to Fixing WordPress.

    I’m using USP pro for the custom fields, and the layout is elementor pro.

    If you write PHP code for WordPress that you need help with then please use that other sub-forum.

    @jdembowski well actually, to create a preview function, writing PHP would be the only answer at this moment, since there aren’t any plugins for this.

    So I’m looking for how to save the answers as draft (because as I have understood it, it must be saved before previewing) and how to instruct WordPress to preview the the current post.

    @bcworkz I’m not after a plugin, I just want something that triggers WordPress preview of current post function, I guess there is a function for that since I can preview my posts if I’m using the internal “add new post” function.

    Moderator bcworkz

    (@bcworkz)

    Yes, the post_preview() function is called, which in part creates an autosave version of the post, then returns a link to follow which displays this version. To save custom data, you can still use “save_post” and similar actions as is done for published posts, the only difference is the post being saved has the ID of a special autosave post, not the ID of the post being edited. If you need to only capture autosave events, you can use the “wp_creating_autosave” action.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Preview a custom form before posting (no preview button exist)’ is closed to new replies.