-
☆ A M B ☆
- 1,056 Posts
So, I have a need for a search application that I am hoping to use eForm for. Basically, I’d like to be able to submit a form with various values, and then when the page loads, the form would still be present and the search values would be intact/populated. Basically, it’s a loop with the option of changing the form values upon each subsequent search...
If values didn’t change, pressing submit would continuously load the same "view", passing the same parameters each time until one more more are altered.
This way, I can then leverage eForm’s event functions (e.g. &eFormOnValidate=`` ) to handle my actual search logic...
However, I am finding that eForm really wants to show a thankyou or chunk/document’s content on successful submission, and cannot seem to figure out if my idea is even possible via eForm.
I’ve tried setting &thankyou equal to the form TPL and even the &gotoid equal to the current document, but eForm does not behave the way one may expect.
Thoughts?
I think it would be possible but I can’t try anything out for you just now. (no access to a suitable modx installation due to PC being recalcitrant)
You could be sneaky and force the form to always fail (preferably after it validated). You might be able to do this in the onbeforemailsent event if I remember correctly by setting $fields[’validationmessage’] to something. In the onbeforeFormMerge you could then remove the validation message again so it shows no error messages...
If I get everything working again soon and have the time (and you haven’t solved it yet by then) I’ll have a closer look at it.