WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: TDO Mini Forms] Redirect to blog after submit? (5 posts)

  1. erintech
    Member
    Posted 5 years ago #

    Hi

    I'm using a simple form for registered used to submit without moderation.

    The default sequence is:

    fill out the form -> submit -> "Your submission "test8" has been automatically published. You can see it here. Thank you for using this service." -> view post

    I would like to make two changes: (1)skip the acknowledgement and (2)go directly to the blog rather than the post (which would show my new post as the first post)

    ie

    submit -> Blog.

    I have a static home page and the blog is accessed from a tab.

    So far I have tried this:

    change line 168 of tdomf-form-post.php

    // $redirect_url = $_POST['redirect'];
    $redirect_url = '/?page_id=35';

    This works fine as regards my objectives 1&2, but the next time I access the form I somehow see the "Your submission xxx has been automatically published...." instead of the form.

    Is there a better solution? / what have I done wrong?

    Many thanks for a fantastic plugin.

  2. the_dead_one
    Member
    Posted 5 years ago #

    On the options for the form, you can set it to see the acknowledgement or get redirect to the post. Look for the option "Redirect to Published Post" under "Turn On/Off Moderation". If you select this, and with you're hack, it should do what you want.

  3. to_ul
    Member
    Posted 5 years ago #

    mmmhhhh - it does not work for me...
    $redirect_url = 'whatever.com';
    i am always getting redirected to the post...but i want redirectet to my blog-index.
    i have turnt on: »redirect to published post«
    when i turn off redirect to published post: i got the some prob like erintech »This works fine as regards my objectives (...), but the next time I access the form I somehow see the "Your submission xxx has been automatically published...." instead of the form.«
    Any idea?

  4. to_ul
    Member
    Posted 5 years ago #

    that kills me.

  5. the_dead_one
    Member
    Posted 5 years ago #

    Before applying the hack, try to turn on redirect to published post and make sure it redirects to a submitted post. Once thats up, try applying the hack. Please be aware though that what erintech was doing, only works on non-AJAX forms. If you use AJAX, you'll need to modify tdomf-ajax-form.php.

Topic Closed

This topic has been closed to new replies.

About this Topic