kevgais Posted May 27, 2008 Share Posted May 27, 2008 Hi guys, I have form that contains several input boxes. I set the value of the 1st input box like: <input type='text' name='email1[]'value="enter guest email here" /> but how can I set the values of other input boxes bases on the 1st input box? something like: <input type='text' name='email2[]'value=email1 /> cheers Quote Link to comment https://forums.phpfreaks.com/topic/107412-copy-input-box-value-to-another-input-box/ Share on other sites More sharing options...
haku Posted May 27, 2008 Share Posted May 27, 2008 This requires javascript, it cannot be done in pure HTML. If you don't mind my asking, why is it that you want to do this? Maybe there is a different solution that can help you achieve what you want. Quote Link to comment https://forums.phpfreaks.com/topic/107412-copy-input-box-value-to-another-input-box/#findComment-550782 Share on other sites More sharing options...
kevgais Posted May 27, 2008 Author Share Posted May 27, 2008 thanks, basically on my form I have a hidden input box that upon loading has a random id entered into it. now, on the same form I have 10 username & email textboxes for users to enter their information in, next to each row (username box & email box) i have hidden input boxes that I want to copy the random id into. this way when I send the the data to the mysql database I have the key identifyer. any thoughts? cheers Quote Link to comment https://forums.phpfreaks.com/topic/107412-copy-input-box-value-to-another-input-box/#findComment-550824 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.