3.3. set, seti, tmp, tmpn 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 four tags that are used to set the scratch space: [set variable] value [/set], [seti variable] value [/seti], [tmp variable] value [/tmp], [tmpn variable] value [/tmpn] and and two tags for reading scratch space: [scratch variable] and [scratchd variable].

[set variable] value [/set]

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

[seti variable] value [/seti]

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

[tmp variable] value [/tmp]

[tmpn variable] value [/tmpn]

[scratch variable]

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

[scratchd variable]

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