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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jrockowitz created an issue. See original summary.

  • fa5543b committed on 3125624-scale-element
    Issue #3125624: Add a scale/net promoter element
    

  • dbf95bc committed on 3125624-scale-element
    Issue #3125624: Add a scale/net promoter element. Add RTL support.
    

  • 89ba5d7 committed on 3125624-scale-element
    Issue #3125624: Add a scale/net promoter element. Add size support.
    

  • b3603b5 committed on 3125624-scale-element
    Issue #3125624: Add a scale/net promoter element. Add test coverage.
    
jrockowitz’s picture

Status: Active » Needs review
FileSize
34.92 KB

Status: Needs review » Needs work

The last submitted patch, 6: 3125624-6.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

  • 227a9b4 committed on 3125624-scale-element
    Issue #3125624: Add a scale/net promoter element. Add test coverage.
    
jrockowitz’s picture

Status: Needs work » Needs review
FileSize
37.45 KB

  • c68c775 committed on 3125624-scale-element
    Issue #3125624: Add a scale/net promoter element. Add example.
    

  • 200de18 committed on 3125624-scale-element
    Issue #3125624: Add a scale/net promoter element. Add style support.
    

  • b1ab8b0 committed on 3125624-scale-element
    Issue #3125624: Add a scale/net promoter element. Add min/max validation...

  • fcf926b committed on 3125624-scale-element
    Issue #3125624: Add a scale/net promoter element. Allow text to place...

  • e9778f5 committed on 3125624-scale-element
    Issue #3125624: Add a scale/net promoter element. Fix broken tests.
    
jrockowitz’s picture

Status: Needs review » Needs work

The last submitted patch, 15: 3125624-15.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

  • b849820 committed on 3125624-scale-element
    Issue #3125624: Add a scale/net promoter element. Fix broken tests.
    
jrockowitz’s picture

Status: Needs work » Needs review
FileSize
42.59 KB

  • 31d48bf committed on 3125624-scale-element
    Issue #3125624 by jrockowitz: Add a scale/net promoter element. Review...
jrockowitz’s picture

Status: Needs review » Needs work

The last submitted patch, 20: 3125624-20.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

  • 3b0cfc4 committed on 3125624-scale-element
    Issue #3125624 by jrockowitz: Add a scale/net promoter element. Review...
jrockowitz’s picture

Status: Needs work » Needs review
FileSize
27.12 KB
barone’s picture

Issue tested
Drupal: 8.8.5
PHP 7.2.24
MySQL 5.7.29
Webform 8.x-5.x

Installing the patch
Patch

Element Scale appear in the add element
Scale type

Adding a Scale Element
Scale element

Scale element front-end
Front end

Webform Submission
Result

jrockowitz’s picture

@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.

barone’s picture

@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

  • jrockowitz authored 71e4d31 on 8.x-5.x
    Issue #3125624 by jrockowitz, barone: Add a scale/net promoter element
    
jrockowitz’s picture

Status: Needs review » Fixed

I made some minor tweaks to the change record. Thank you for helping out.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.