Hi,

This is further to a discussion on Randy Fay's site: http://randyfay.com/node/67#comment-2003

I'm trying to add some checkboxes to the checkout form that when checked/unchecked change some of the other form elements. I started with the example code on the above page, copying and pasting into a hook_form_alter function in a custom module.

This works perfectly if I'm logged in, but for anonymous users the ajax call only happens the first time the checkbox is changed.

Randy suggested I put the code in a sandbox and post an issue here, so here it is!

The sandbox is at http://drupal.org/sandbox/tripper54/1231976

I hope someone can help with this (I'm probably doing somethig stupid)....

cheers,

Phil

Comments

it-cru’s picture

+subscribe, but for logged in users too.

I'm currently developing a directdebit payment module, where a required checkbox is displayed (yes, I give permission to withdraw money from my bank account) should be checked to complete a directdebit payment.

  • If the checkbox isn't checked the user can not switch back to the other payment methods (following drupal message thrown: An illegal choice has been detected. Please contact the site administrator.)
  • If the checkbox is checked the user can switch back to the other payment methods.
rszrama’s picture

Status: Active » Closed (won't fix)

This support request is a year and a half old, so I'm hoping it's been resolved by now. Closing this out, Phil, but if you're actually still searching for a solution, I recommend opening a new discussion thread on DrupalCommerce.org. All the best!