The main use case is having a checkbox that says "Use billing information" on the shipping pane.
We discussed doing this on a checkout pane level, by syncing all common fields.
Here's the patch. It's not as clean as I'd like it to be (especially the after_build trick), but it seems to be working, enough to start the discussion.
After I wrote the patch, I noticed that the shipping address has the "Full name" field which the billing address doesn't have, so when the shipping address gets hidden and the billing info gets reused, that never gets filled, which makes me doubt the suitability of the current approach. So maybe doing this on an addressfield level might be needed after all.
Comments
Comment #1
ikos commentedThe fact that shipping address has full name and billing address has first / last name is a configuration issue so maybe we can put a check in place for this (since they are both variants of AddressField).
Comment #2
ranx commentedsubscribe
Comment #3
joachim commentedI'm a bit confused about the need for this. As far as I can tell, a checkout pane submit callback has access to everything in $form_state.
At least, I seem to have them in $form_state['values'][PANE_ID].
Comment #4
joelpittet@bojanz same question as #3 can this be closed, it's a bit stale?
Comment #5
bojanz commentedYeah.