This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 2

[closed] After submitting a form


  1. Regardt
    Member

    Hi,

    Currently when the submit button is clicked you can either display a success message, or direct to a URL.

    1.Is it possible after clicking the submit button, that the window closes automatically and NOT display or direct.?

    Posted 16 years ago #
  2. yuniar

    Are you sure you want to do this? Your user won't have any clue what has happened if you do so.

    If you really sure, edit your embed.php and view.php file, around line 31 you will find this code:

    if($submit_result['status'] === true){

    Right under that line , insert this code:

    echo "<script type=\"text/javascript\">top.window.opener = top;top.window.open('','_parent','');top.window.close();</script>";
    exit;


    That should close your window immediately.

    However, the code above won't work in Firefox. Since I can't seem to find any javascript code to close Firefox tab.

    Anybody know?


    MachForm Founder

    Posted 16 years ago #
  3. Regardt
    Member

    Thanks Yuniar,

    I have a auto responder on the form that will serve as notification.

    Posted 16 years ago #
  4. yuniar

    Ahh.. that make sense.


    MachForm Founder

    Posted 16 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.