help with html forms

Discussion in 'HTML & Website Design' started by falco85, Sep 12, 2006.

  1. #1
    hi,
    I have a problem modifying a script for which I am making customizations by myself.

    The problem is on a form, in which I want to convert 3 checkboxes (so that they can be toggled together) into 3 radio buttons (so to let the user make one choice only). The fact is that in the checkboxes, every box has got its own name and value, while the radio buttons differ for the value but need to have the same name.

    Now the problem is that I cannot modify the entire script because its huge, so I need to shunt this in someway. Basically, I need to pass the user selection in the radio buttons as values for those checkboxes' names.

    Any help is greatly appreciated :) Thanks!
     
    falco85, Sep 12, 2006 IP
  2. frankcow

    frankcow Well-Known Member

    Messages:
    4,859
    Likes Received:
    265
    Best Answers:
    0
    Trophy Points:
    180
    #2
    do you mean you want to create the checkboxes in realtime? Or are you saying you want to reprogram the HTML of the form to present checkboxes instead of radio buttons?
     
    frankcow, Sep 12, 2006 IP
  3. falco85

    falco85 Peon

    Messages:
    721
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I mean, I want to pass the value of the radio button selection to hidden checkboxes, if that's possible.
     
    falco85, Sep 12, 2006 IP
  4. edelman

    edelman Peon

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    what language are you writing in?

    Also, why hidden checkboxes? Why not just use an input with the type "hidden" to store the value of the radio buttons, if that's really what you want?
     
    edelman, Sep 12, 2006 IP
  5. frankcow

    frankcow Well-Known Member

    Messages:
    4,859
    Likes Received:
    265
    Best Answers:
    0
    Trophy Points:
    180
    #5
    yeah, I don't think I've ever heard of anyone using hidden checkboxes...
     
    frankcow, Sep 12, 2006 IP
  6. Ottomund

    Ottomund Peon

    Messages:
    79
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #6
    The best way I can think to do this is to create an interim script that will check or uncheck the checkboxes based upon which radio button is selected. Basically you would change the target of your submit form to another page that autopopulates the fields on a new form based on your radio buttons and other form entries. The interim page should auto submit these updated fields to the original onsubmit of the fist form.
     
    Ottomund, Sep 12, 2006 IP