Another bug diagnosed by #2852207: Billing same as shipping.

When a payment_method radio is clicked, form api considers the rebuilt form to be submitted, ignoring the default values, and causing empty values to be shown instead. For example, the checkout form is loaded, "Cash on delivery" is selected, as is "Billing same as shipping" (since its #default_value is TRUE). Then we click "Credit card", and "Billing same as shipping" is unchecked, because there is $user_input.

The solution is the same that Address module uses, after #ajax clear dependent user input.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bojanz created an issue. See original summary.

bojanz’s picture

Status: Active » Needs review
FileSize
1.72 KB

  • bojanz committed 8a86b70 on 8.x-2.x
    Issue #3115087 by bojanz: Clear dependent form input when a...
bojanz’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

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

Alex Bukach’s picture

This issue happens again because of https://www.drupal.org/project/commerce/issues/2950877 committed.