In NumberWidget annotation we incorrectly call it a "Text field".

Comments

alexpott created an issue. See original summary.

alexpott’s picture

Issue tags: +Novice
alexpott’s picture

/**
 * Implements hook_field_widget_info().
 */
function number_field_widget_info() {
  return array(
    'number' => array(
      'label' => t('Text field'),
      'field types' => array('number_integer', 'number_decimal', 'number_float'),
    ),
  );
}

Hmm... maybe this is correct... perhaps it is trying to tell it is using a text field for numeric entry.

eli-t’s picture

Assigned: Unassigned » eli-t
alexpott’s picture

However maybe HTML5 makes this more complex because this uses Drupal\Core\Render\Element\Number... and that generates a <input data-drupal-selector="edit-field-ads-0-value" type="number" id="edit-field-ads-0-value" name="field_ads[0][value]" value="" step="1" placeholder="" class="form-number"> which is now a number input.

eli-t’s picture

Status: Active » Needs review
StatusFileSize
new0 bytes

Changed to "Number field"

aspilicious’s picture

Status: Needs review » Needs work

patch is empty

eli-t’s picture

Status: Needs work » Needs review

/stabs self

eli-t’s picture

StatusFileSize
new540 bytes
aspilicious’s picture

Status: Needs review » Reviewed & tested by the community

Is correct

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 508bbb5 and pushed to 8.0.x. Thanks!

  • alexpott committed 508bbb5 on 8.0.x
    Issue #2556515 by Eli-T: NumberWidget is not a "Text field"
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.