public function HubspotBlock::blockForm in Hubspot forms 8
Overrides BlockPluginTrait::blockForm
File
- src/
Plugin/ Block/ HubspotBlock.php, line 32
Class
- HubspotBlock
- Display Hubspot Form.
Namespace
Drupal\hubspot_forms\Plugin\BlockCode
public function blockForm($form, FormStateInterface $form_state) {
$HubspotFormsCore = new HubspotFormsCore();
$form['form_id'] = [
'#type' => 'select',
'#title' => $this
->t('Hubspot Form'),
'#description' => $this
->t('Please choose a form you would like to display.'),
'#options' => $HubspotFormsCore
->getFormIds(),
'#default_value' => $this->configuration['form_id'],
'#required' => TRUE,
];
return $form;
}