[development] converting a module from Drupal 5 to Drupal 6
Sheryl (Permutations Software)
sheryl at permutations.com
Wed Jan 21 16:34:44 UTC 2009
Please - I don't need links or excerpts from the linked pages. I've read the
docs. I can't see how to apply what is written to this module code.
Is there anyone here who can add something to what is already in the docs -
fill in the missing piece for me?
From: development-bounces at drupal.org [mailto:development-bounces at drupal.org]
On Behalf Of Michael Prasuhn
Sent: Wednesday, January 21, 2009 5:10 AM
To: development at drupal.org
Subject: Re: [development] converting a module from Drupal 5 to Drupal 6
On Jan 21, 2009, at 1:11 AM, Stewart Robinson wrote:
> Op means different things in different places, or at least its
> values do.
> What function does your copied code come from and do you know the
> value of op?
'op' doesn't mean anything with forms in Drupal 6.
From http://drupal.org/update/modules/ I was able to find this page:
which is titled Drupal 5.x to 6.x form changes.
Here are a few excerpts from that page:
> A full copy of the button element that was clicked to submit the
> form. This is more reliable than the old $form_values['op'] name,
> and also carries any additional information that was placed in the
> button element's form definition.
> The 'op' element in the form values is deprecated and should not be
> relied upon
> As discussed above, each button can have #validate and #submit
> functions associated with it. Thus, there should be one button that
> submits the form and which invokes the normal $form_id_validate and
> $form_id_submit handlers. Any additional buttons which need to
> invoke different validate or submit functionality should have button-
> specific functions. Note also that the 'op' element in the form
> values, corresponding to the button clicked when there are several
> in a form in Drupal 5.x, should no longer be relied upon and may not
> be present.
mike at mikeyp.net
More information about the development