Announcement

Collapse
No announcement yet.

Option button not checked

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Option button not checked

    Hello,

    - I design a form with Bluevoda like this.

    <FORM name="register" action="mail.php" method="post">
    .
    .
    <DIV style="Z-INDEX: 1; LEFT: 144px; OVERFLOW: hidden; WIDTH: 25px;
    POSITION: absolute; TOP: 39px; HEIGHT: 25px" align=left>
    <INPUT type=radio value="Bpk" name="bi">
    </DIV>

    <DIV style="Z-INDEX: 3; LEFT: 216px; OVERFLOW: hidden; WIDTH: 25px;
    POSITION: absolute; TOP: 40px; HEIGHT: 25px" align=left>
    <INPUT type=radio value="Ibu" name="bi">
    </DIV>
    .
    .
    <DIV style="Z-INDEX: 31; LEFT: 145px; OVERFLOW: hidden; WIDTH: 65px;
    POSITION: absolute; TOP: 531px; HEIGHT: 30px" align=left>
    <INPUT type=submit value="kirim" name="register">
    </DIV>
    .

    - Both input type=radio are not CHECKED.
    - After hitted the submit button to redirected to "mail.php",
    you got undefined "bi" in "mail.php".
    - But it is OK when one of them is CHECKED.

    Should you always CHECKED one when working with input type=radio ?

  • #2
    Radiobutton groups always must have 1 button selected.
    If this behaviour is not whta you want, use checkboxes instead.
    Forum Moderator
    BlueVoda Spe******t

    Comment


    • #3
      A solution ?

      Hello,

      Using checkboxes, users have the opportunity to select none.
      That is not what I want. My solution is, add one option button belonging
      to the same group which I select. Then in some way hide this. This is to
      get out of the warning undefined variable. When users do not select the
      non CHECKED button, force them to select one before going further.
      What is your opinion ?


      Originally posted by Pablo
      Radiobutton groups always must have 1 button selected.
      If this behaviour is not whta you want, use checkboxes instead.

      Comment


      • #4
        You will have to use javascript to do this, or add an extra radio button and make it invisible.
        Forum Moderator
        BlueVoda Spe******t

        Comment

        Working...
        X