We use several ways to pass the flag to validate/submit handlers:

- flag_form() uses $form['#flag'].

- flag_delete_confirm() does $form['fid'] = array('#type' => 'value', '#value' => $flag->fid)

- flag_confirm() does $form['flag_name'] = array('#type' => 'value', '#value' => $flag_name).

- I'm using $form_state['flagging'] for #871064: Making flaggings fieldable.

What should we do about this?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quicksketch’s picture

Out of these, $form['#flag'] would be my preference.

mooffie’s picture

OK, I'll provide a patch after #887324: Modernize the menu items is committed (because it provides the $flag variable).

joachim’s picture

Version: 7.x-2.0-beta3 » 7.x-3.x-dev

$form['#flag'] is the standard on D7 for passing things to submit handlers.

joachim’s picture

Status: Active » Needs review
FileSize
1.96 KB
joachim’s picture

joachim’s picture

Status: Needs review » Fixed

What is it with testbot at the moment?

Quicker to run the tests myself...

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.