[ic] perl code in mv_check gets executed despite verification failure

Ed LaFrance interchange-users@icdevgroup.org
Wed Feb 19 11:55:01 2003


At 03:10 PM 02/19/2003 +0000, you wrote:
>Jonathan Clark wrote:
>
>>>Hi - I strongly suspect i'm missing the point of mv_check. If i am can
>>>someone tell me the *proper* way to do this? I'm attempting to perform a
>>>database operation with form data but i only want the operation to
>>>happen if the form passes the verification successfully.
>>>
>>>I have mv_order_profile set to myprofile in a hidden field in my form.
>>>In etc/profiles.order i have defined myprofile. I have mv_check set to
>>>performop in a hidden field in my form. Later on that page i have a
>>>[seti performop]...[/seti] section with the code i want to execute after
>>>verification.
>>>
>>
>>You should be setting your routine using [set] not [seti] - you are
>>interpolating and running the code when the page is delivered at the moment.
>>
>>Jonathan
>>www.webmaint.net
>
>My bad - it is a [set]. There's a [seti] inside it though. I thought 
>[seti] inside [set] wouldn't be interpolated?
>
>John

mv_check execution is not predicated on all form checks passing 
successfully; mv_check gets parsed after IC data structures are updated by 
the from submission, that is all. Your explanation above does not clearly 
explain how you expect to conditionally parse the mv_check target. As is 
always the case with Interchange, there are many ways. For instance, you 
could use &success=somepage to pass execution through somepage.html if the 
form passes all checks, and execute your code there.

- Ed L.


===============================================================
New Media E.M.S.              Technology Solutions for Business
463 Main St., Suite D         eCommerce | Consulting | Hosting
Placerville, CA  95667        edl@newmediaems.com
(530) 622-9421                http://www.newmediaems.com
(866) 519-4680 Toll-Free      (530) 622-9426 Fax
===============================================================