Forums

Submit Article after Confirmation Page

pcheng 23 Aug, 2011
I am trying to use Submit Article after the confirmation page. In the confirmation page I print the $form->data using
<?php print_r2($form->data); ?>

but when I submit article using the On Submit part nothing gets send and everything is empty. Is there a special way I should be calling my fields? I simply use their names, for example, input_title which is available in $form->data[input_title].

Is there something I am doing wrong or not doing at all?

If I do not use the confirmation page the Submit Article seems to work fine.

Thanks,

Pericles
GreyHead 23 Aug, 2011
Hi Pericles,

The Confirmation page in a little pain in the neck. it effectively re-displays the form and the $form->data id lost. You have to use the Data to Session and Session to Data actions to save the form data and get it back again.

I got this working a few days ago. See the diagram below for the main actions (you may have others as well).

[list=1]
  • When the form is first submitted the data is saved to the user session.

  • When the User clicks back to re-edit the form is relaoded and

  • The data is restored for editing. This should be automatic provided that 'Republish' is set to 'Yes' in the Show HTML action (this is the defaut setting). When the edited from is submitted the revised data is saved to the session again over-writing the previous data.

  • When the user confirms that the form is OK to submit the data is reloaded from the session again (logically this shouldn't be necessary but I think I had to do it to get it working OK.)
  • [/list:o]

    Bob
    pcheng 23 Aug, 2011
    I added the session data parts as you said but I still can't submit anything even though $form->data and $_POST have the values that I need.

    Could it be that I should be referencing the fields in Submit Article with any other way than just the field name? Should I put $_POST[input_title] instead of input_title?

    Pericles
    pcheng 29 Aug, 2011
    Submit article from within the confirmation page is still not working.

    Here is my events list with the session parts that you suggested.



    The submit article button works with no confirmation page but not with the confirmation page.

    Pericles
    GreyHead 17 Sep, 2011
    Hi Pcheng,

    I've been away and have lost track of just where you got to with this. Is it working now?

    Bob
    pcheng 25 Sep, 2011
    I was also away visiting the beautiful Barcelona. Now I am back and will start working on the site again so I will be bugging you all on the forums again.🙂

    As for the problem here:

    Its only working without the confirmation page.

    The data is still there and I can print them out but when I submit it does not work.

    Without the confirmation page it works fine.

    Pericles
    GreyHead 09 Oct, 2011
    Hi JP,

    Wht do you see if you put a Debugger action immediately before the Submit Article action?

    Bob
    pcheng 24 Oct, 2011
    I did a simple form in another website and still after the confirmation page I get nothing.

    I added the Session Data parts and the Debugger and I do not see any debugging and no article published. I have a form with 1 text field and 2 text areas and then an auto server side validation and inside that the confirmation page.

    I see the confirmation page but when I click submit it goes to a new page and nothing happens. It's as if it never goes to On Confirm.

    Pericles
    GreyHead 25 Oct, 2011
    Hi pcheng,

    You should still see the debugging information when you submit :-( How are you redirecting to the next form?

    Bob
    This topic is locked and no more replies can be posted.