By aries on
Houston, we've got problem.
I've created forms without any html wrapping around (without html, body, etc, just the pure forms), everything is okay but when I submit them the validation errors only appearing after the second refresh, not the first one. Eg. I forgot to fill the Title field, which is required, then I the form is come back, highlights the title textfield with red, but the "Title field is required" message only appears when I refresh the form.
I've played with it a little, in the hook_validate() i can dump the $_SESSION['messages'], which is not empty, but in the returning form it doesn't appear just only next time.
Comments
Show us your code
To get an intelligent response you need to post your code.
gpdinoz
"Everything should be made as simple as possible, but not simpler." - Albert Einstein
Regards
Geoff
function foo_menu() {
When I call foo/add , I see only the pure form, which works perfectly, except that I missed to fill the
title, the error message only appears on the second submit, and after that you retrieve again foo/add,
you see the error msg again, in spite you haven't submited the form again. (Seems the presentation of
the messages is shifted.)
--
Aries
A friend of mine told me the
A friend of mine told me the solution. I have to put the theme() functions to a separate function set by #after_build FAPI directive. I don't really know why does it work but it works :)
--
Aries
Not clear for me
Aries
I didn`t what you are saying...can you be more clear? sorry.
I`m get this same error calling a form in a admin`s outside page.
Thanks