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.
Problem/Motivation
The webform module should support a scale (1-10) element.
@see https://www.google.com/search?q=net+promoter+score
Proposed resolution
Add a scale/net promoter element.
Remaining tasks
- Create element
- Create test
- Create CSS (copy button css)
- Create webform element
- Add to style guide
Notes
- Extends radios
- Input is responsive
Properties
- #type: webform_scale (Scale rating)
- #lowest_rating_text: Worst
- #lowest_rating_value: 1
- #highest_rating_text: Best
- #highest_rating_value: 10
User interface changes
New element.
API changes
N/A
Data model changes
N/A
Release notes snippet
N/A
Comment | File | Size | Author |
---|---|---|---|
#24 | issue-3125624-test-05.png | 62.11 KB | barone |
#24 | issue-3125624-test-04.png | 26.2 KB | barone |
#24 | issue-3125624-test-03.png | 33.85 KB | barone |
#24 | issue-3125624-test-02.png | 20.64 KB | barone |
#24 | issue-3125624-patch-26-applied.png | 151.13 KB | barone |
Comments
Comment #6
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House for Rosewood Marketing commentedComment #9
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House for Rosewood Marketing commentedComment #15
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House for Rosewood Marketing commentedComment #18
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House for Rosewood Marketing commentedComment #20
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House for Rosewood Marketing commentedComment #23
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House for Rosewood Marketing commentedComment #24
baroneIssue tested
Drupal: 8.8.5
PHP 7.2.24
MySQL 5.7.29
Webform 8.x-5.x
Installing the patch
Element Scale appear in the add element
Adding a Scale Element
Scale element front-end
Webform Submission
Comment #25
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House for Rosewood Marketing commented@barone For extra credit, could you help create a change record that describes the scale element/feature. You can reuse the screenshots you took from #24.
Comment #26
barone@jrockwittz i created the Change Record, however i have never done this before. If you couldm please, revise and let me know if this is ok or if need any changes: https://www.drupal.org/node/3126873
Thanks and cheers from Brazil
Comment #28
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House for Rosewood Marketing commentedI made some minor tweaks to the change record. Thank you for helping out.