Dear Experts,
I’ve been doing some activities using form input. I was pleased to see the excellent validation capability that Eform has. I even got it using REGEX, and it works beautifully.
As you know, Eform is generally used to send email. What I was hoping to do (upon successful form submission) was to load a 2nd page and use POST data from the first page to populate parts of it.
At first I tried using the "gotoID" to load the 2nd page. So it went to that page fine, but I lost the POST variables.
To fix that, I altered the original form template to have "action" explicitly load the 2nd page. That worked, getting my POST variables back! But that seemed to break the nice validation that I had on the first page; it just seems to skip all of that now.
It would be great if I could do both; have validation on the 1st form, and then load a second page, retaining the POST variables for other purposes. Maybe Eform isn’t set up to allow all of this?
Your thoughts and ideas appreciated!!!
Thanks
Quote from: Dimmy at May 09, 2007, 01:37 PM
you could use an eform event to start pluin a pice of cusom code. that way you could grab all the post entries and use them in the snippet/code that opens the new page just post the variables to the new page this way
http://wiki.modxcms.com/index.php/EForm
greets Dimmy
Dimmy,
Thanks for the idea! I understand the concept (sort of), and I guess I’ll dig into the Eform code to understand it better. I see that in the latest version there are a couple of events in particular that may apply to this.
In the meantime, I may not have time for that now, so I might take another form script that I have that has some validation, and I may just use that as a quick-and-dirty solution.
Cheers, Samba
-
☆ A M B ☆
- 1,056 Posts
I believe you could also use "eFormOnValidate" to call a method that stores your validated form input in SESSION scope.
Then, on Page #2 try using "eFormOnBeforeFormMerge" to call a method that pre-populates the form after referencing the dataset in SESSION.
Quote from: pixelchutes at May 09, 2007, 03:27 PM
I believe you could also use "eFormOnValidate" to call a method that stores your validated form input in SESSION scope.
Then, on Page #2 try using "eFormOnBeforeFormMerge" to call a method that pre-populates the form after referencing the dataset in SESSION.
Pixelchutes,
Great ideas... I’ll have to study up on Session handling, and maybe I’ll need a Placeholder or two. Hey, if I went from zero to being able to write Regex last week, I suppose even a lame PHP programmer like me can handle this.
I keep thinking of more things to do, and each one requires brand-new skills. Just-in-Time-Learning personified, I guess! With MODx, I haven’t really found anything that I can’t handle somehow. And that’s saying a lot.
You advanced MODx people are the greatest! I appreciate your patience with us newbies.
Cheers, S
-
☆ A M B ☆
- 1,056 Posts
Quote from: samba at May 09, 2007, 03:39 PM
Pixelchutes,
Great ideas...
...
You advanced MODx people are the greatest! I appreciate your patience with us newbies.
Happy to do it! As dependent as I often am on the forums/docs/community, the least I can do is return the favor
Be sure to share your experience with us to let us know you were successful, and how it was accomplished!