[development] a "form_initialize" function? (was "converting a module from Drupal 5 to Drupal 6")

Earnie Boyd earnie at users.sourceforge.net
Thu Jan 22 13:00:09 UTC 2009

Quoting "Sheryl (Permutations Software)" <sheryl at permutations.com>:

> In the meantime, how do I get the name of the submit button so I can use the
> same technique the module is currently using, but rewritten for Drupal 6?

Based on the below the button name is 'op'.

> The button is not explicitly defined anywhere in the code - it must be using
> defaults. Also, according to the Drupal 6 docs, the name for buttons
> assigned by the system is 'op' - suggesting that the existing code is
> already correct:
> http://api.drupal.org/api/file/developer/topics/forms_api_reference.html
> The following is a list of default values which do not need to be set (found
> in system_elements):
> button
> #name = 'op'
> #button_type = 'submit'
> #executes_submit_callback = FALSE
> #ahah['event'] = 'click'
> -------------------------------------
> Thus this statement is exactly correct for what I want to do, even in Drupal
> 6:
> form_set_error('op', 'error text');
> Am I missing something here?

Deadwood has given you a false positive; ignore the warning.

Earnie  http://r-feed.com
  Make a Drupal difference and review core patches.

-- http://for-my-kids.com/  -- http://give-me-an-offer.com/

More information about the development mailing list