You are here

private static function jssor_views_plugins_style::fixD8FormTypes in Jssor Slider 7

Converts D8 specific form element types to a D7 generic version. Currently only supports "number".

Parameters

array $form:

Return value

mixed

File

./jssor_views_plugins_style.inc, line 39

Class

jssor_views_plugins_style

Code

private static function fixD8FormTypes($form) {

  // Need to change input field type "number" to textfield.
  foreach ($form as $key => $element) {
    if (stripos($key, "#") === false) {
      if ($form[$key]['#type'] == 'number') {
        $form[$key]['#type'] = 'textfield';
      }
    }
  }
  return $form;
}