On February 4, 2021 . By CodimTh Category: Web Drupal Add number field to form in drupal 8 & 9 Example how to Add number field to form in drupal 8 & 9: $form['number'] = array( '#type' => 'textfield', '#attributes' => array( ' type' => 'number', ), '#title' => 'Number', '#required' => true, '#maxlength' => 3 ); Tags : Drupal Tutorial Drupal Tips Drupal Previous PostGet the node ID value after submit a Webform attached to that nodeNext PostHow to count query results of entityQuery in drupal 8 & 9 Comments Add new comment Your name Subject Comment About text formats Restricted HTML Leave this field blank
Comments