Back
Linking two input fields
Other·Calvin Correli·Sep 6, 2011· 1 minutes
When you send emails from zenbilling, you get to choose a separate sender email and reply-to address. Usually they're one and the same, but sometimes you want them to be different. The way I did this is to have two input fields, one for each, but to have them linked, so when you make changes to sender email, reply-to is automatically updated with the same change. Unless reply-to has been changed to be different from sender email, in which case we leave reply-to alone. Today I needed this pattern somewhere else, and so I wrote a handy little jQuery function for it, which you can find here. Enjoy!