We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32380
    • 137 Posts
    Im Having a problem with displaying a confirmation list of the combined form details before the form is sent (as per TobyL on page 1 of this thread)

    his question was
    <form method="post" action="[~[*id*]~]" id="datainput">
    <input type="hidden" name="formStep" value="3"/>
    <input type="hidden" name="foo" value="[+foo+]"/>
    <input type="hidden" name="bar" value="[+bar+]"/>
    <input type="hidden" name="baz" value="[+baz+]"/>
    <p>Please confirm your entry:<br/>
    Item 1: [+foo+]<br/>
    Item 2: [+bar+]<br/>
    Item 3: [+baz+]<br/>
    <input type="submit"  name="go" value="finish"/></form>


    but when i use the place holders eg [+foo+] nothing shows up, can someone let me know how to get around this please?
      • 32380
      • 137 Posts
      Really hope someone could answer my question,
      I’m trying to create a confirmation page that the customer confirms the details before the email has been sent but all i can get working is it showing the report but it also sends the email which is one step too early for me?
      Anybody?
        • 32380
        • 137 Posts
        Come on modx community don’t let me down
        • The thread you linked to explains how to do it; if you read through the thread you’ll see there was another person who did much the same thing as what you want to do. He was reminded that he had to reload the values from the SESSION.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 32380
            • 137 Posts
            Thats the part that confused me as I’m not that great at php would need it explained in laymans was hoping someone could help
              • 32380
              • 137 Posts
              Aaaahaaaa done it!!

              If anyone had the same problem as me this is how overcome it, (for anyone with as little php coding skills as me)

              In the multiFormFunctions snippet add the following to the relevant case
              case 1: //form not yet posted so use tpl as set in snippet call
              			return true;
              		case 2:
              			$replaceTpl = "multiForm2";
                                      $fields['SomeFormItem'] = $_SESSION['SomeFormItem']; //This is the added code
              			break;

              then in the form add [+SomeFormItem+] ta daaa
                • 32380
                • 137 Posts
                I have stumbled upon another problem,

                When I have gone through the 4 part form I have made and reach the end report I have added a link to return the user so they can order another item but when the next button is clicked to move the user onto the second part of the form I get a blank page!!, I think its to do with the cache as if I login to manager and clear the cache it works again?
                • For complex forms built into a single document, you cannot use partial page caching features in MODx. Disable the cacheable flag for the document( s ) involved.
                    • 32380
                    • 137 Posts
                    Is there a way to allow TV’s to work with this?
                    I have tried to use one and it shows on the page correctly but when you move onto the next part of the form it throws up "invalided value?"
                      • 29313
                      • 4 Posts
                      A have another question related to multi-step form. Any good advice on how to implement the Back button, so that user could return to the previous step in the form? Using ’javascript:history.go(-1)’ first gives a warning about resending post data and then resets the form. At least this is what happening in IE.