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.

CommentFileSizeAuthor
sync.patch5.19 KBbojanz

Comments

ikos’s picture

The 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).

ranx’s picture

subscribe

joachim’s picture

I'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].

joelpittet’s picture

Issue summary: View changes

@bojanz same question as #3 can this be closed, it's a bit stale?

bojanz’s picture

Status: Needs review » Closed (won't fix)

Yeah.