I'm not sure if this module is being maintained anymore, but it would be nice if it supported the field weight / re-ordering functionality that is now built into addresses.
I've gone ahead and updated the code myself to enable this functionality. Here are the basic steps:
1) Open the .module file for the extra fields module you wish to update
2) Navigate to the hook_addressesfieldapi function
3) Add the following code at the very beginning of this function:
$field_weights = variable_get('addresses_field_weight', array());
4) Add the following entry at the end of each $form[fieldname] = array(...) declaration:
'#weight' => empty($field_weights['fieldname']['weight']) ? 0 : $field_weights['fieldname']['weight'],
It should be pretty clear where these lines should go as there are several similar entries in each field definition. Make sure to replace 'fieldname' with the actual name of each individual field.
That's it.
Comments
Comment #1
AlexisWilke commentedISPTraderChris,
Would you be so kind as to generate a patch? Then I can apply it to the module.
I have a customer that uses a version of addresses that was heavily modified so I cannot easily maintain this module 8-(.
Thank you.
Alexis
Comment #2
AlexisWilke commentedFixed and checked in.
Thank you for submitting the fix, it was much quicker than looking into the code myself.
Alexis Wilke