Submit Form without Clicking

10 replies
Hey Warriors,

I have an autoresponder form and my members add their details and click submit, then it goes to the membership register form already filled in with the details they submitted, and, I was wondering if there is a way to make it automatically submit that form so they don't have to click submit again?

See I don't even want them to see that page, I would like it to go there and submit and go to the page it redirects to after submitted.

Anyone know the code for this?

I had it once before but lost it...

Dennis
#clicking #form #submit
  • Profile picture of the author mywebwork
    Hi Dennis

    Not sure if this will help, just a thought:

    Is the destination page also setup as a form - i.e. does it have a submit button? If so you may be able to bypass it by (a) changing the "Action =" parameter of the first form to equal that of the second (if there is a "name" or "id" attribute you may need to match it too) and (b) adding hidden fields to match any additional fields that may be in the second form.

    The idea is to provide the second forms destination with all the information it needs using the first form.

    Hope that made some sense!

    Bill
    {{ DiscussionBoard.errors[616861].message }}
    • Profile picture of the author Bruce Hearder
      Hi Dennis

      One way to do it is as follows :

      Once the user has filled in their details, send them to another page
      that has a their details filled out into a form, that automically fires the submit button and the form is submitted.

      To do this you need to do the following :

      Code:
      <html>
      <head>
         <title>Processing form</title>
      </head>
      <body onload="document.form.submit();">
         <form name="form" action="'somedestinationurl.com" method="post">
      ....
      ....
      Your formstuff here
      ...
      ...
         </form>
      </body>
      </html>
      This should do the trick for you..

      Hope this helps

      Bruce
      {{ DiscussionBoard.errors[617866].message }}
  • Profile picture of the author Dennis Cheesman
    Hello,

    Yes that works but it just keeps submiting, because once it submits it comes back to that page and is supposed to redirect to the :

    header("location: http://orderpage.com");

    But instead it keeps submitting over and over.

    Dennis
    {{ DiscussionBoard.errors[617943].message }}
  • Profile picture of the author revenue.fm
    To better understand, what you want to do is:

    1. User fills out Autoresponder, hits submit
    2. Automatically fill out the membership form, and hit submit
    3. User lands on order page

    ...correct?

    How much control do you have over the code on the backend?

    Depending on how savvy you are with programming, I would have a generic opt-in form and then simultaneously post to both services using cURL (assuming php)
    {{ DiscussionBoard.errors[619280].message }}
  • Profile picture of the author Dennis Cheesman
    I have full control it is my script

    But the autoresponder form is used from aweber..

    Dennis
    {{ DiscussionBoard.errors[619465].message }}
  • Profile picture of the author Bruce Hearder
    Dennis,

    The destination of the form (based on the submit) should be defined by the Aweber parameters (such as the thank you page).

    It shouldn't loop, unless something is telling it to come back to this page.

    This may sound like a silly question, but have you checked the destination urls in Aweber (such as the confirm page and thank you page) are all active and working.

    Other than that, I can't see how you can redirect the page to somewhere else, because it is controlled by the code behind the form on Aweber.

    Take care

    Bruce
    {{ DiscussionBoard.errors[622181].message }}
  • Profile picture of the author Dennis Cheesman
    When I submit the aweber form it takes it to the register.php file as the thankyou page then it submits the register.php file and submits the members details.

    It just keeps submitting over and over because the action file is register.php

    Dennis
    {{ DiscussionBoard.errors[627386].message }}
    • Profile picture of the author stevenh512
      You'll need to modify your register.php to redirect to another page once the form is submitted. Without seeing your register.php I wouldn't be able to give you too much help, but at some point in the PHP file (after it records the user details to the database, but before it sends any output back to the browser) you should add something like this:

      header('Location: http://some.other.url');

      Of course replace http://some.other.url with whatever membership or login page you need to redirect to.
      Signature

      This signature intentionally left blank.

      {{ DiscussionBoard.errors[627572].message }}
  • Profile picture of the author Dennis Cheesman
    That is the way it is now..

    header('Location: http://clickbankurl.com);

    But like I said it just keeps redirecting...

    Dennis
    {{ DiscussionBoard.errors[628555].message }}
    • Profile picture of the author stevenh512
      Why are you redirecting new members (after they sign up and their info is recorded in the database) back to your clickbank URL? Or are you redirecting them to an OTO or something?

      You could always change it to:

      header('Location: login.php');

      or

      header('Location: members.php');

      or whatever page on your own site members should end up going to after signing up and see if that helps.

      I can take a look at for you if you want. PM me with more details (a link to the site, where members should end up after they register). It might help to take a look at the register.php file too, it's possible your redirect isn't being called at all and that could be why the page just keeps reloading/resubmitting itself.
      Signature

      This signature intentionally left blank.

      {{ DiscussionBoard.errors[629545].message }}

Trending Topics