Currently, when defining the form for a handler, you can add a form element to a fieldset using '#fieldset'. However, this is not an option for plugins. This is because the base implementation of options_form in views_handler adds a pre_render function, views_ui_pre_render_add_fieldset_markup.

Is there a reason this wasn't added to plugins? Plugins could have configuration forms that require fieldsets.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Anonymous’s picture

Status: Active » Needs review
FileSize
1.9 KB

This patch adds the pre_render function in the views_plugin class. Another approach would be to add it to the views_object class and remove it from the views_handler class. That would require adding an options_form implementation to views_object.

If this will be committed, then parent::options_form($form, $form_state); should be added to all plugins, as I have for the query plugins in this patch. Let me know if this is the correct approach and I can post a new patch with those additions.

dawehner’s picture

Status: Needs review » Fixed

There was no real specific reason to not put it on plugins,
because there was no use case when this got implemented but sure this makes sense.

So thanks for providing the patch. Commited to 7.x-3.x

Status: Fixed » Closed (fixed)

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