I am using hook_form_alter function in the user registration form and generating a form field when the form fails validation. But I am not getting the $form state array.

Can someone help me to resolve the issue.

Looking for early reply.

Comments

brand-newbie’s picture

Version: 6.14 » 6.13
damien tournoud’s picture

You cannot do that. If the form fails validation, it will not get rebuilt so you cannot change its structure.

What exactly do you want to do? There might be another way to achieve your goal.

Anonymous’s picture

Status: Active » Closed (works as designed)

No response from OP, closing.