drupal ‘#process’ callback seems not working! – Education Career Blog

here is my hook_elements:

function test_elemets() {  
  return array(
    'test_field' => array(  
          '#input' => TRUE,  
          '#process' => array('test_field_process'),
    )
  );
}

and process callback:

function test_field_process($element, $edit, &$form_state, $complete_form)  
    $element = array();    
    return $element;    
}

as you see in process function I used $element=array() to see what happens.But the form is shown as it was before.why?

,

What did you expect to happen if you do not implement hook_elements? You function have mistake in name test_elemets should be test_elements
that is why your element type do not apply so you just call markup type as default one.

Leave a Comment