WebformButtons.php in Webform 6.x
File
modules/webform_jqueryui_buttons/src/Element/WebformButtons.php
View source
<?php
namespace Drupal\webform_jqueryui_buttons\Element;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Render\Element\Radios;
class WebformButtons extends Radios {
public static function processRadios(&$element, FormStateInterface $form_state, &$complete_form) {
$element = parent::processRadios($element, $form_state, $complete_form);
$element['#attributes']['class'][] = 'js-webform-buttons';
$element['#attributes']['class'][] = 'webform-buttons';
$element['#options_display'] = 'side_by_side';
$element['#attached']['library'][] = 'webform_jqueryui_buttons/webform_jqueryui_buttons.element';
return $element;
}
}