Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jan 2008
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Making Form Fields Appear or Disappear,Based on the Value of other Fields

    Here is the other one..This requires a textbox to open while clicking of a radiobutton in one part and in the other part on the click of a list/menu.

    I want that..as I click the second radiobutton,the textbox be displayed so that the data may be posted.else itremains hidden or engraved..and a similar other problem with list/menu in place of rado button.

    Tablename:form
    Columnames : (i) des,des_url
    Columnnames: (ii)dom,domname


    PHP Code:
    <form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post" >
    <table width="90%" align=center cellpadding=2 class=medium>
        <tbody>
          <tr bgcolor=#42519c>
            <td colspan=2><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>1. Type of Web Site </strong></font></td>
          </tr>
          <tr>
            <td width="42%"><font color="#333333" size="1" face="Verdana, Arial, Helvetica, sans-serif"><br>
                  <input   type=radio  name=design   value=New_Web_Site />
            New Web site design </font></td>
            <td width="58%" rowspan=2><font color="#333333" size="1" 
                            face="Verdana, Arial, Helvetica, sans-serif"><br>
            </font> </td>
          </tr>
          <tr>
            <td><font color="#333333" size="1" face="Verdana, Arial, Helvetica, sans-serif"><br>
                  <input  type=radio  name="design" value=Re-design />
            Re-design a Web site</font></td>
          </tr>
          <tr>
            <td width="42%"><font color="#333333" size="1" 
                            face="Verdana, Arial, Helvetica, sans-serif"><br>
            If re-design, what is the URL?&nbsp; </font></td>
            <td valign=bottom><div align=right><font color="#333333" size="1" 
                            face="Verdana, Arial, Helvetica, sans-serif"><br>
                      <input  maxlength=80 size=50 name=des_url  >
            </font></div></td>
          </tr><tr>
    <td class=ws_body valign=top colspan=2><font color="#333333" size="1" 
                            face="Verdana, Arial, Helvetica, sans-serif">Do you have a Internet Merchant Account?</font></td>
              <td class=ws_body valign=top><font color="#333333" size="1" 
                            face="Verdana, Arial, Helvetica, sans-serif">
                <select name=ima>
                  <option selected>Select</option>
                  <option  value=yes>Yes</option>
                  <option value=no>No</option>
                  <option value="not sure">Not Sure</option>
                </select>
              </font></td>
            </tr>
            <tr>
              <td class=ws_body valign=top width="18%"><font color="#333333" size="1" 
                            face="Verdana, Arial, Helvetica, sans-serif">If yes, with what company <br>
            (WorldPay, PaySystems, etc)?</font></td>
              <td class=ws_body valign=center colspan=2><div align=right><font color="#333333" size="1" 
                            face="Verdana, Arial, Helvetica, sans-serif">
                  <input maxlength=500 size=50 name=imabank>
              </font></div></td></tr>
        </tbody>
      </table>
    </form>

  • #2
    Regular Coder Iszak's Avatar
    Join Date
    Jun 2007
    Location
    Perth, Western Australia
    Posts
    332
    Thanks
    2
    Thanked 58 Times in 57 Posts
    You're looking for the javascript section not the PHP section. I think this is what you're looking for but it's not with the radio buttons.
    http://www.dynamicdrive.com/dynamici...menu/index.htm


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •