Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By qqboy on
dear all teacher and gurus.
code we found this
$types['textarea'] = array(
'#input' => TRUE,
'#cols' => 60,
'#rows' => 5,
'#resizable' => TRUE,
'#process' => array('ajax_process_form'),
'#theme' => 'textarea',
'#theme_wrappers' => array('form_element'),
);
and said #process take parameter like $element, $form_state, and $complete_form.
but i can not understand or see what those PARAMETERS are exactly in this case or
i missed something ? I mean what $element, $form_state, and $complete_form refer to ?
hope some one can help us make it clear
thank u very much regards
Comments
$element will be $form[
$element will be $form['textarea']
$form_state will be the regular $form_state for the form
$complete_form will be the entire form that $form['text_area'] is a part of.
thank u make it clear i think
thank u make it clear i think what you mean is
if we have a hook element info
you mean that $element is $form['keywords']
am i right ?
thank u very much mr JAYPAN
https://www.drupal.org/project/image_captcha_indicator
https://www.drupal.org/project/ext_js
Yes. If you add a process
Yes. If you add a process function to $form['keywords'], then in the process function, $element would be $form['keywords'].
then as we see so many
then as we see so many functions here and there
so how to make it clear
it s a headache.
thank you for explaining.
by the way, how did you know the $element is $form
https://www.drupal.org/project/image_captcha_indicator
https://www.drupal.org/project/ext_js
I don't remember! I probably
I don't remember! I probably just examined it. I have a lot of info floating around in my head, that I don't know where it came from.
dont tell me you are a
dont tell me you are a supereman
or you are from mars
or some other planet
i guess you have some secret weapon and a strong brain.
https://www.drupal.org/project/image_captcha_indicator
https://www.drupal.org/project/ext_js
Not a superman, from earth
Not a superman, from earth (well, Canada).
My brain stores Drupal information really well though!
well nice thank u
well nice thank u
https://www.drupal.org/project/image_captcha_indicator
https://www.drupal.org/project/ext_js