2

In Commerce Line Items quantity field which is an integer field, user can not enter more than 9999, what should i do to unlimit the field?

1 Answer 1

2

Although that limit appears sane to me, to adjust the maxlength, look at

commerce_line_item_field_widget_form

  $element['line_items'][$line_item_id]['quantity'] = array(
    '#type' => 'textfield', 
    '#datatype' => 'integer', 
    '#default_value' => $quantity, 
    '#size' => 4, 
    '#maxlength' => max(4, strlen($quantity)),
  );

You could use hook_field_widget_form_alter and adjust the #maxlength property there.

0

Not the answer you're looking for? Browse other questions tagged or ask your own question.