Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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).
Comment | File | Size | Author |
---|---|---|---|
variable_form_submit_callback.patch | 4.4 KB | Jose Reyero | |
Comments
Comment #1
Jose Reyero CreditAttribution: Jose Reyero commentedCommitted the the patch, now we can simplify a great deal the Variable File module in Variable Extra.