[ic] Forms done right

Stefan Hornburg (Racke) racke at linuxia.de
Thu Aug 18 08:16:53 UTC 2016

On 08/15/2016 05:33 PM, Josh Lavin wrote:
> Quoting Grant (emailgrant at gmail.com):
>> My IC forms are non-standard and kind of cobbled together.  Is there
>> an example online of how to do simple form validation and then
>> conditional ITL execution?
> Typically, one would just do something like:
>     [set mycheck]
>         &update=yes
>         fname=required
>     [/set]
>     [set doSomething]
>         [usertag here or other action]
>     [/set]
>     <form action="[area my-next-page]" method="post">
>     <input type=hidden name=mv_action       value=go>
>     <input type=hidden name=mv_form_profile value=mycheck>
>     <input type=hidden name=mv_click        value=doSomething>
> The mv_form_profile will happen before the mv_click, and the mv_click is
> conditional on the profile passing. "mv_check", however, is _not_
> conditional on the profile succeeding:
> http://www.icdevgroup.org/pipermail/interchange-users/2003-February/031679.html
> Also see:
> http://interchange.rtfm.info/icdocs/category:Interchange_forms.html

I would rather use an ActionMap than this old style IC form processing.

You can run $Tag->run_profile inside of it which allows you to use
your profiles defined in the catalog.

Aside of that, it is safer as you can circumvent the magic variables
by posting the form by a bot / from a script.


Ecommerce and Linux consulting + Perl and web application programming.

More information about the interchange-users mailing list