Does anybody know how to pass the value of variable from a hook to the page where formit redirects to? (the variable contains in most cases ~1.500 characters)
Is it best to do it by a session variable?
By a cookie?
$hook->setValue + FormItRetriever?
Unfortunately $modx->setPlaceholder does only work when not redirecting to another page. Or should this normally work?
Does anybody know which way is best?
Letti
-
☆ A M B ☆
- 24,524 Posts
Hi Susan,
does FormItRetriever also works for placeholders or only for field valus of the form sent by formit?
-
☆ A M B ☆
- 24,524 Posts
If the hook inserts the variable into the fields array using $hook->setValue() then it should pass it on. It depends on what the hook is doing.
-
☆ A M B ☆
- 24,524 Posts
I don't see that it would make any difference as far as performance goes; the data has to be passed and inserted somehow. I would keep life simple and use a hook and FormItRetriever, just so I keep it all in the FormIt family, so to speak. Getting tangled up in SESSION and COOKIE is not something I care to do unless it's absolutely necessary.
Thanks for your estimation. So, I will choose $hook->setValue + FormItRetriever.
Thanks again,
Letti
Hi Susan,
it seems like $hook->setValue is limited concerning the number of characters. Using this method we get a blank screen when transmitting bigger amounts of words ...
-
☆ A M B ☆
- 24,524 Posts
Break it up into two or three section with three placeholders.