Skip to content

Instantly share code, notes, and snippets.

Gab gambry

Block or report user

Report or block gambry

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
gambry / TextfieldWithMaxlengthWidget
Created Dec 6, 2017
Drupal text field widget to set custom maxlength
View TextfieldWithMaxlengthWidget
namespace Drupal\mymodule\Plugin\Field\FieldWidget;
use Drupal\Core\Field\FieldItemListInterface;
use Drupal\Core\Field\Plugin\Field\FieldWidget\StringTextfieldWidget;
use Drupal\Core\Form\FormStateInterface;
* Plugin implementation of the 'textfield_with_maxlength' widget.
You can’t perform that action at this time.