Cancel edit

Cancel edit

Saturday 23 September 2006 9:06:00 am - 3 replies

Author Message

Claudia Kosny

Saturday 23 September 2006 12:16:42 pm

Hello Alejandro

Here my thoughts on this:
Editing something consists of two major parts.
First you have the html page consisting out of the form elements where you enter the new information. Once this page is visible in the browser there is nothing you can do to to change the page (except with Javascript and Ajax). So the best your operator could do on this part is the adapt the edit page depending on some condition you know before the page is sent to browser.
But if the condition depends on whatever the user put into the edit form a template operator will not help you much. Most of the times the form is posted to some php script which then has to call and check the return value of your operator. Depending on the outcome the script either cancels the operation or continues. As most forms have a cancel option anyway you just need to look what happens if a customer clicks on this button to cancel the edit.
I am not sure how I would implement something like this. Most likely I would write my own extension to which all forms are posted. All forms would need to include the original form action in a hidden form field. My extension then would check the condition to see whether the data should be further processed or not. If yes the received data would be posted to the original form action.

Pretending the edit was successfull might be problem as sometimes the forms redirect to the view of the just edited object. To fake this might be cumbersome.

No matter how you do it, if you get your spamfilter to work please post you experiences here - it might be useful for others as well.

Greetings from Luxembourg

Claudia

Alejandro Serrano

Monday 25 September 2006 10:43:03 am

I've been thinking a bit more. Maybe I could do it in the same way that datatypes are checked. Is this possible? If yes, could you point me into some direction?

Thanks again

Claudia Kosny

Monday 25 September 2006 11:44:15 am

Hi Alejandro

Good idea. Maybe you should have a look at the EZcaptcha extension. I have not tried it and I don't know whether it works with newer versions of EZ but it should give you some hints on how to do this.

Claudia

You must be logged in to post messages in this topic!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.