I have a form whose content is based upon the url. I want to return a drupal_not_found if the url is incorrect.

If I place drupal_not found in the form function, then the theming function is still called and placed after the not found page.

So, I have

function myForm()
{
  if (arg(3) is bad) return drupal_not_found;
  return $form;
}

function theme_myForm($form)
{
  $output = "themed form";
  return $output;
}

Comments

ajg112’s picture

Something went wrong there, please go here for the full post:
http://drupal.org/node/260836