Jump to content

Recommended Posts

have a radio button with three options, let's say, A, B, C.  And several drop-down fields (selects), lets say, 1, 2, 3, 4 . . . 

 

I want to change the values in select fields based on the radio button choices. 

 

So if user selects A on the radio button, then drop-down 1 has one set of values, if user selects option B on the radio button, then drop-down 1 has another set of values, and so on ...  I can use JS or PHP to accomplish this.  Also, all select values are hard-coded (no db or file).

 

An important thing to note is that on-change the selects call a JS function that does some computations and displays the results on screen right away. 

 

So, each time a radio button value changes, it should change the selects' values and also update the computations.

 

Any help is greatly appreciated!

 

 

Link to comment
https://forums.phpfreaks.com/topic/145964-radio-button-to-change-drop-down-fields/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.