Jul 05, 2009, 09:09 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
Search via SMF or Google: modx forums all of modxcms.com web
  MODxCMS.com   Forums   Help Login Register  
News:Read what MODx Developers say: MODx Dev. Blogs
Pages: [1]   Go Down
  Print  
Author Topic: eform urls and blank page  (Read 497 times)
0 Members and 1 Guest are viewing this topic.
rajfantastic
Member
**
Posts: 51



WWW
« on: Nov 24, 2008, 02:01 AM »

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=`my@email.com` &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?
« Last Edit: Nov 24, 2008, 02:06 AM by rajfantastic » Logged

stevesunderland.com
GRAPHICS | INTERACTIVE | MARKETING
xhtml + ajax + seo websites powered by modx
TobyL
Moderator
*
Posts: 1,006



« Reply #1 on: Nov 24, 2008, 03:14 AM »

I would be helpful to see your form template as well...
Logged

rajfantastic
Member
**
Posts: 51



WWW
« Reply #2 on: Nov 24, 2008, 03:29 AM »

thanks for the reply! this form is really basic:

Code:
[+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>&nbsp;</td>
    <td><input type="submit" name="submit" value="Send Request"></td>
  </tr>
</table>

</form>
Logged

stevesunderland.com
GRAPHICS | INTERACTIVE | MARKETING
xhtml + ajax + seo websites powered by modx
TobyL
Moderator
*
Posts: 1,006



« Reply #3 on: Nov 24, 2008, 07:03 AM »

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?

Logged

rajfantastic
Member
**
Posts: 51



WWW
« Reply #4 on: Nov 24, 2008, 10:50 AM »

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:

Code:
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 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:

Code:
[!DisplayOrder!] [!eForm? &...!]
Logged

stevesunderland.com
GRAPHICS | INTERACTIVE | MARKETING
xhtml + ajax + seo websites powered by modx
rajfantastic
Member
**
Posts: 51



WWW
« Reply #5 on: Nov 24, 2008, 09:02 PM »

amazingly, this form works without any problem using FormProcessor 2...
Logged

stevesunderland.com
GRAPHICS | INTERACTIVE | MARKETING
xhtml + ajax + seo websites powered by modx
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP

Copyright © 2005-2008 MODxCMS, All rights reserved. Contact Us
Styles by ziworks.com

Powered by SMF | SMF © 2006-2008, Simple Machines LLC

Valid XHTML 1.0! Valid CSS!