While trying to add file variables, we've found the need for more form related variable callbacks.

- Add a new variable 'submit callback' that will be invoked like this on form submission:

  myvariable_form_callback($variable, $options, $form, &$form_state);

- Add more parameters to the existing 'validate callback', see variable_form_element_validate() in patch

  myvariable_validate_callback($variable, $options, $element, $form, &$form_state);

The rest of the patch are minor adjustments to make these callbacks work on several variable forms (included realm forms).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Jose Reyero’s picture

Category: Feature request » Task
Status: Needs review » Fixed

Committed the the patch, now we can simplify a great deal the Variable File module in Variable Extra.

Status: Fixed » Closed (fixed)

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