Problem/Motivation

Developers and site builders should be able to alter a webform with cards when the active card changes.

Proposed resolution

Add events to webform cards

Remaining tasks

Add events
Create test form
Write tests

User interface changes

N/A

API changes

Event added to webform_cards.js

Data model changes

N/A

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jrockowitz created an issue. See original summary.

  • 2cd448c committed on 3163521-webform-cards-events
    Issue #3163521: Add events to webform cards
    
jrockowitz’s picture

Status: Active » Needs review
FileSize
8.7 KB

  • d9aea46 committed on 3163521-webform-cards-events
    Issue #3163521: Add events to webform cards
    
jrockowitz’s picture

FileSize
7.97 KB

  • c430d7e committed on 3163521-webform-cards-events
    Issue #3163521 by jrockowitz: Add events to webform cards
    
jrockowitz’s picture

nginex’s picture

Status: Needs review » Reviewed & tested by the community

The patch #7 works for me. Thanks

jrockowitz’s picture

Status: Reviewed & tested by the community » Fixed

  • jrockowitz authored 84bbeba on 8.x-5.x
    Issue #3163521 by jrockowitz: Add events to webform cards
    

  • jrockowitz authored 2782e29 on 8.x-5.x
    Issue #3163521 by jrockowitz: Add events to webform cards
    

  • jrockowitz authored 2782e29 on 6.x
    Issue #3163521 by jrockowitz: Add events to webform cards
    
  • jrockowitz authored 84bbeba on 6.x
    Issue #3163521 by jrockowitz: Add events to webform cards
    

Status: Fixed » Closed (fixed)

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

apparatchik’s picture

How does one listen to this event? Does it have to be attached to the form as in:

$form['#ajax'] = [
                'callback' => 'my_ajax_callback',
                'event' => 'webform_cards:change',
                'progress' => [
                    'type' => 'throbber',
                    'message' => '',]
            ];

Regards.