Event does'nt send succes but sends error ok
This is an open discussion with 5 replies, filed under Troubleshooting.
Search
Are you redirecting after success? This will lose the event response. The best thing to start with is changing your form action
attribute value to ?debug
, so that the form posts directly to the debug view of your page, and will not redirect.
Thanks again for your help!
I was doing a redirect to #comment
with <input name="redirect" type="hidden" value="#comment" />
Without the redirect it works fine now. So there is no way of having a redirect and getting the xml response? If I add the redirect (with or without ?debug
in action
) I lose the response.
forget my last comment.. I just added the redirect in the action
attribut. Thanks anyway
The redirect
variable that you send will only be used if the event is successful. So you have two options:
- Use the
redirect
to a generic success page, but you cannot use the posted data (unless you then use a data source to re-query the new entry) - Don't use a redirect, post the event to the same page (a blank
action
attribute) and use XSLT to change the HTML output depending on the result of the event (success/fail).
I usually use #2 above, by hiding the form and replacing it in-page with a thank you message. This way you still have the posted data in the XML so you can have a "Thank you {name}" message.
Thanks for the clarification, I didn't noticed the redirect was only effective upon success since I was redirecting to a hashtag, but when I think about it, it makes perfect sense.
Create an account or sign in to comment.
Helle everyone,
I'm having trouble getting a simple "save comment" event send the success message back.
I get the errors:
But upon success the
<events />
tag desperatly stays empty... an idea why?