[development] converting a module from Drupal 5 to Drupal 6

Sheryl (Permutations Software) sheryl at permutations.com
Wed Jan 21 17:34:24 UTC 2009

Ah! This helps. Thank you!! So in Drupal 6 I would change this to:

	if ($form_state['submitted'] == false) {}


Now I just have that other mystery:

  if (<something wrong with module installation>) {
    form_set_error('op', _phpfreechat_not_found());

I'm guessing that this prevents the user from submitting the admin form if
the module isn't installed correctly. (I need to confirm by causing the
error and seeing what happens in the admin form.)

In Drupal 6, how do I set a general form error that is not related to a
particular field? Or maybe the question is... In Drupal 6, how do I set a
form error tied to the submit button?

-----Original Message-----
From: development-bounces at drupal.org [mailto:development-bounces at drupal.org]
On Behalf Of Steven Jones
Sent: Wednesday, January 21, 2009 11:49 AM
To: development at drupal.org
Subject: Re: [development] converting a module from Drupal 5 to Drupal 6

$form_values['op'] is the '#value' of the clicked button on a form, so
I'd guess if it were empty, then then the form hasn't been submitted

Steven Jones
ComputerMinds ltd - Perfect Drupal Websites

Phone : 0121 288 0434
Mobile : 07951 270 026

More information about the development mailing list