-
- 275 Posts
I have the following situation:
Form A : offers a list to the user; user selects item from list and submits Form A
Formit handles Form A with:
[[!Formit? &hooks=`redirect` &redirectTo=`30`]]
Form B: processes the selected item from Form A
Form B is the redirect "30" used in the Formit call in Form A
The items are a set of values set by a Javascript routine into hidden input fields in Form A prior to submitting Form A
Am I correct to assume that these values should be available in Form B when I define the same hidden fields in Form B?
If not, does that then implicate that Formit cannot be used for situations where one has multiple chained forms that complete a specific process?
MODx Revolution / MAMP / OS X
-
- 275 Posts
Thanks!
When you say "placeholders", do you mean hidden input fields or something else?
Could you give an example of how to make a placeholder if you don’t mean hidden inputs.
Sorry for the ignorance, but I’m rather new at modx...
MODx Revolution / MAMP / OS X
-
- 275 Posts
I think I figured it out.
made a snippet that does the following:
<?php
$modx->setPlaceholder("name", $_SESSION["last-form"]["name"]);
?>
I can now use [[+name]] in the second form.
By the way: I came across a handy thing in $_SESSION.
There’s an array called ’last-form’ which holds all posted values of the last form.
I wasn’t aware of this. Is this standard PHP or is this a modx feature?
MODx Revolution / MAMP / OS X
I believe it’s a formit thing; it’s used to prevent re-submitting exactly the same form.