Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
I think that is best idea that input opacity will be number instead of textfield. Number FAPI allow set max and min and step. It's more intuitive to edit content.
I attached a patch.
Comment | File | Size | Author |
---|---|---|---|
#2 | color_field-input_number-2887091-1.patch | 4 KB | eloivaque |
Comments
Comment #2
eloivaquecredits
Comment #3
nord102Patch tested. Applied cleanly. Functionality would most definitely help content entry and edit.
Comment #4
nord102Comment #6
NickDickinsonWildeUnfortunately, other commits made this not apply cleanly. However, I totally agree it is way better to use the correct html input type. I manually applied the changes and did a couple further changes:
- changed the step value to 0,01; allows more specific opacity values.
- removed the maxlength/size attributes as HTML5 number inputs don't use those.
Anyways, thanks for the patch! Finally committed.