Hi friends,
I am developer , but new in drupal.
Now i need to change a form if there is drupal validation error happened.
I am editing the doc module.

I am using to validation of the mopdule using the function

form_set_error('upload', t('This file name is alreay exist in this folder ! Do you want to replace the file?'));

If this code is execute I need to remove a form feild from the code.This is my requirement.

Plz help me

Comments

progga’s picture

Set a flag if the form fails validation. Then generate that specific form element in hook_form (if it is your own form) depending on the value of that flag.

thaha’s picture

thank you