We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24393
    • 83 Posts
    i am trying to use eForm on a page with a URL that looks like this :

    http://mysite.com/user-order-view?transaction_id=122728

    when i submit the form, the url turns into this :

    http://mysite.com/user-order-view.html

    here is my snippet call : [!eForm? &tpl=`returns_form` &formid=`returnsForm` &to=`[email protected]` &report=`returns_report` &subject=`Return Request` &gotoid=`112` !]

    this returns a blank page. even if i hard-code this particular URL into the eForm "action" i still get a blank page. the transaction_id variable needs to be appended to the url in order for this page to function. also, the alias of doc id#112 is different from this URL, but eform doesn’t redirect there. i’m using the latest release of everything. any way to fix/debug this?
      stevesunderland.com
      GRAPHICS | INTERACTIVE | MARKETING
      xhtml + ajax + seo websites powered by modx
      • 30223
      • 1,010 Posts
      I would be helpful to see your form template as well...
        • 24393
        • 83 Posts
        thanks for the reply! this form is really basic:

        [+validationmessage+]
        <form method="post" id="returnsForm" action="[~[+id+]~]">
            <input type="hidden" name="formid" value="returnsForm" />
        
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td>Transaction </td>
            <td><input name="transaction_id" id="transaction_id_form" type="text" size="40" maxlength="60" readonly="readonly"  /></td>
          </tr>
          <tr>
            <td>Email</td>
            <td><input type="text" name="email" size="40" maxlength="40" readonly="readonly" id="email_form" /></td>
          </tr>
          <tr>
            <td valign="top">Comments</td>
            <td><textarea cols="40" rows="10" name="comments"></textarea></td>
          </tr>
          <tr>
            <td> </td>
            <td><input type="submit" name="submit" value="Send Request"></td>
          </tr>
        </table>
        
        </form> 
          stevesunderland.com
          GRAPHICS | INTERACTIVE | MARKETING
          xhtml + ajax + seo websites powered by modx
          • 30223
          • 1,010 Posts
          First comment: You do not have any eform attributes in your fields for validation. It would be wise to add alt least some minimal validation to for instance the email field so you can be reasonably sure that it contains a valid email address. Basically if you are submitting an empty form it will validate and thus jump to ’gotoid’ page.

          Secondly: Why the read-only attributes? Doesn’t that mean that users can’t supply any value? This doesn’t make much sense to me as there is no default value provided.

          Why do you need the transaction_id variable to be appended to the url for the page to function? This indicates to me that this is not a straight forward modx page and that you have other scripts (snippets?) running. Is this so?

            • 24393
            • 83 Posts
            hi toby, thanks for taking the time to help me with this.

            1. i removed the vericode to make sure that wasn’t the culprit. other than that, i don’t need any validation because the form is so simple, and...
            2. the read only attributes are being populated with javascript because i am trying to get placeholder values from another snippet. the only way i could do this was to use mootools:

            var transaction_id = $('transaction_id').get('text');
            		$('transaction_id_form').set('value', transaction_id);


            3. i am trying to create a simple "returns" form on the "view order" page generated by http://modxcms.com/forums/index.php?topic=28505.0"" target="_blank" rel="nofollow">foxyback. first i tried to use eForm from within a chunk that was being called by another snippet, which obviously didn’t work. i now have a page with two snippets:

            [!DisplayOrder!] [!eForm? &...!]

              stevesunderland.com
              GRAPHICS | INTERACTIVE | MARKETING
              xhtml + ajax + seo websites powered by modx
              • 24393
              • 83 Posts
              amazingly, this form works without any problem using FormProcessor 2...
                stevesunderland.com
                GRAPHICS | INTERACTIVE | MARKETING
                xhtml + ajax + seo websites powered by modx