Skip to content
Snippets Groups Projects
Commit 328f1723 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #717576 by mr.baileys: incorrect param name in text_field_widget_form().

parent 803e63de
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -513,14 +513,13 @@ function text_field_widget_settings_form($field, $instance) { ...@@ -513,14 +513,13 @@ function text_field_widget_settings_form($field, $instance) {
/** /**
* Implements hook_field_widget_form(). * Implements hook_field_widget_form().
*/ */
function text_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $base) { function text_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) {
$element = $base;
$summary_widget = array(); $summary_widget = array();
$main_widget = array(); $main_widget = array();
switch ($instance['widget']['type']) { switch ($instance['widget']['type']) {
case 'text_textfield': case 'text_textfield':
$main_widget = $base + array( $main_widget = $element + array(
'#type' => 'textfield', '#type' => 'textfield',
'#default_value' => isset($items[$delta]['value']) ? $items[$delta]['value'] : NULL, '#default_value' => isset($items[$delta]['value']) ? $items[$delta]['value'] : NULL,
'#size' => $instance['widget']['settings']['size'], '#size' => $instance['widget']['settings']['size'],
...@@ -548,7 +547,7 @@ function text_field_widget_form(&$form, &$form_state, $field, $instance, $langco ...@@ -548,7 +547,7 @@ function text_field_widget_form(&$form, &$form_state, $field, $instance, $langco
// Fall through to the next case. // Fall through to the next case.
case 'text_textarea': case 'text_textarea':
$main_widget = $base + array( $main_widget = $element + array(
'#type' => 'textarea', '#type' => 'textarea',
'#default_value' => isset($items[$delta]['value']) ? $items[$delta]['value'] : NULL, '#default_value' => isset($items[$delta]['value']) ? $items[$delta]['value'] : NULL,
'#rows' => $instance['widget']['settings']['rows'], '#rows' => $instance['widget']['settings']['rows'],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment