Hi, I’ve made a formit call:
[[!FormIt? &hooks=`snippet_parseresult` &store=`1` &validate=`IMDbMovieCode:required]]
in the form there’s a field ’Code’, which I want to use in a custom snippet (snippet_parseresult), but I can’t seem to access the field result. I dug into some of the FormItcode, and now I use:
require_once(’core/components/formit/model/formit/fihooks.class.php’);
$hook = new fiHooks();
$Code = $hook->getValue(’Code’);
This doesn’t result in any error messages, but I’m guessing this is totally the wrong way. Can somebody please help? Tnx!
Have you tried that without the first two lines? The $hook object should be available already.
I did, but then I got an error message. But now I tried again, after your suggestion, and now it works! Tnx!
I think earlier I made the wrong FormIt-call, e.g. when I include a redirect (and also &redirecTo), then, this doesn’t work. Also, earlier I didn’t put the result in a placeholder, rather I tried to ’return’ the result directly to the resource (return $Code;), which is not the proper way to do it and probably caused the error. Hope this helps someone else.
Tnx again!