You are here

public function PanelizerEntityFlexiformWebformSubmission::hook_form_alter in Flexiform 7

Implements a delegated hook_form_alter.

We want to add Panelizer settings for the bundle to the flexiform form.

File

flexiform_webform/plugins/entity/PanelizerEntityFlexiformWebformSubmission.class.php, line 40
Class for the Panelizer commerce_order entity plugin.

Class

PanelizerEntityFlexiformWebformSubmission
Panelizer Entity commerce_order plugin class.

Code

public function hook_form_alter(&$form, &$form_state, $form_id) {
  if ($form_id == 'flexiform_webform_form') {
    if (isset($form['form'])) {
      $bundle = $form['form']['#default_value'];
      $this
        ->add_bundle_setting_form($form, $form_state, $bundle, array(
        'form',
      ));
    }
  }
}