/**
  * @param OptionsField $field
  * @return string
  */
 public function render(OptionsField $field)
 {
     /** @var OptionsField $field */
     $fieldValue = is_array($field->getValue()) ? $field->getValue() : array();
     $html = '<select name="' . $field->getFormIdentifierAsString() . '[]" id="' . $field->getName() . '"' . $this->getAttributesAsHtml() . '>';
     $html .= $this->renderOptions($field->getOptions(), $fieldValue);
     $html .= '</select>';
     return $html;
 }
 /**
  * @param OptionsField $field The OptionField to render
  * @return string The HTML of the rendered select field
  */
 public function render(OptionsField $field)
 {
     $required = $field->hasRule('ch\\metanet\\formHandler\\rule\\RequiredRule') === true ? ' aria-required="true"' : null;
     $html = '<select name="' . $field->getFormIdentifierAsString() . '" id="' . $field->getName() . '"' . $this->getAttributesAsHtml() . $required . '>';
     // Render the alternate options structure if set else fallback to the fields options array
     $html .= $this->renderOptions(is_array($this->renderOptions) ? $this->renderOptions : $field->getOptions(), $field->getValue());
     $html .= '</select>';
     return $html;
 }