3.3. set, seti, scratch and scratchd

Scratch variables are maintained in the user session, which is separate from the form variable values set on HTML forms. Many things can be controlled with scratch variables, particularly search and order processing, the mv_click multiple variable setting facility, and key Interchange conditions session URL display.

There are three tags that are used to set the scratch space, [set name]value[/set], [seti name]value[/seti], [tmp name]value[/tmp], and two tags for reading scratch space.

[set variable]value[/set]

          [set checkout]
          name=required Please enter your name.
          address=required No address entered.
          [/set]
          <INPUT TYPE=hidden NAME=mv_order_profile VALUE="checkout">
          [set substring_case]
          mv_substring_match=yes
          mv_case=yes
          [/set]
          <INPUT TYPE=hidden NAME=mv_profile VALUE="substring_case">
            [calc]$Scratch->{foo} = 'bar'; return;[/calc]

[seti variable][value something][/seti]

            [set name=variable interpolate=1][value something][/set]

[tmp name]value[/tmp]

[scratch name]

            [perl]$Scratch->{foo}[/perl]

[scratchd]

[if scratch name op* compare*] yes [else] no [/else] [/if]