I am creating a php page that allows users to add a new letter to a letter archive that is saved to an XML file. One of the form elements is recipient with a text box. I would like to add a button that when clicked it will bring up another text box incase there are two recipients, I'm not sure how to do this( I know how to add a button to the page, just the method for when the button is cliked?) and if I need to change the XML file as each letter record only has one recipient tag?

Recommended Answers

All 2 Replies

Instead of this route, you could allow the user to enter two recipients separated by either a comma or semi-colon - similar to how many email clients work.

I agree with paulkd. You could write in the JS to add more text boxes dynamically, but it would probably be much easier to just have them separate them by a delimiter. You could use a textarea and have them put a new address on each line.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.