By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,837 Members | 1,358 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,837 IT Pros & Developers. It's quick & easy.

Change multiple fields in Form via radio box

P: 2
Hey all,

I would like to do the following:

I have 3 radio boxes.

Expand|Select|Wrap|Line Numbers
  1. <input name="br" type="radio" value="first">Button1<br>
  2. <input name="br" type="radio" value="second">Button2<br>
  3. <input name="br" type="radio" value="third" />Button3<br>
Depending on which is selected, I would like it to change ALL 3 values on the form (below).
Expand|Select|Wrap|Line Numbers
  1. <form method=post name="myform" action="page2.php">
    <input type='hidden' name='item_name' value='Toys'>
    <input type="hidden" name="item_number" value="1">
    <input type="hidden" name="amount" value="29.00">
        <input type="submit" value="Send form!">
In effect:
button1 would change the fields to: Toys, 1, 29
button2 would change the fields to: Bikes, 2, 45
button3 would change the fields to: Beer, 3, 10

Any help would really be appreciated,

Oct 4 '07 #1
Share this Question
Share on Google+
2 Replies

P: 2
I was searching high and low for a solution, and just found it....

It works perfectly for what I was looking for...
Oct 4 '07 #2

Expert 5K+
P: 7,435
Yes. HTML/CSS cannot do this and, as your links show, the solution is a javascript one.
Oct 5 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.