I have 2 address fields : Res. addr and Permanant addr. On clicking another field : same as above
I want to copy all the values entered in Res. addr to Permanant addr.
Please let me know how to do it?
Thanks, ronforever
I have 2 address fields : Res. addr and Permanant addr. On clicking another field : same as above
I want to copy all the values entered in Res. addr to Permanant addr.
Please let me know how to do it?
Thanks, ronforever
There is no simple solution, and therefore I'm not sure this question is good for the Drupal Stack Exchange. It's going to be a matter of custom JavaScript or AJAX Form API code, and it will be dependent on how you're using Address Field and what sort of form you're integrating it into.
Based on the comments below, though, I'd add that there's nothing particularly challenging about this. If both sets of form elements are on the same page, it's a simple matter to use JavaScript (especially with jQuery) to copy the data from one form field to the next. There just isn't a simple property to toggle within the form API code itself.
I had the same problem and my solution was to use RULES. I have to address fields on my node, one is the registration address of a particular company a the other address field is the standard shipping address.
So in my case I have made the shipping address field not mandatory and if its empty a RULE i triggered which copies the address from the other field.