Active
Project:
Translation Management
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Aug 2011 at 19:55 UTC
Updated:
7 Aug 2011 at 19:57 UTC
Hello,
Sorry if this is a Drupal/CCK and not Translation Management issue.
I created a custom type using CCK and trying to add some basic validation logic to icl_translate_editor form.
I used this code to accomplish this:
function MyModule_form_icl_translate_editor_alter(&$form, &$form_state) {
$form['#validate'] = array('icl_translate_editor_validate');
}
function icl_translate_editor_validate(&$form, &$form_state) {
... validating the filelds ...
if( $error ) {
form_set_error('field', t('error message'));
}
}
But this problem is that if validation fails after submitting the form and function form_set_error is called, the next page display the same form and SOME of CCK fields become empty.
Do i miss something? Why some of the fields are filled and some not?
Thank you!