3 Replies Latest reply on Nov 19, 2009 9:14 AM by AnnieWannie

    show if menu selection from with in form help

      I created a dynamic form with developer toolbox, that include "date, location, (category menu, subcategry menu, as depend dropend drop down menu) price, description, terms, image, contact informaton, qualifications. and a couple more"), I need to show diferent form fields like "qualifications" if a selection from the category menu is selected and show others if a difrent selection is selected.

      my form is in a php document, I'm not good with code, that is why I use developer toolbox, i used show if conditional before but I can not figure this to work with a menu selection.

      any help will be apresiated.
        • 1. Re: show if menu selection from with in form help
          Günter Schenk Level 4
          Hi Juan,

          ADDT´s "Show If Conditional Region" server behaviour is technically not capable to show/hide form elements based on e.g. a menu selection -- its purpose it to show/hide page elements when the page´s recordset meets a certain criteria.

          Your approach could in theory be realized by adding custom-made javascript functionality to your document, but this is beyond ADDT´s scope of features and would require some decent javascript expertise.

          Cheers,
          Günter Schenk
          Adobe Community Expert, Dreamweaver
          • 2. Re: show if menu selection from with in form help
            AnnieWannie Level 1

            I am hoping to do something similar, and am somewhat familiar with javascript.

             

            After choosing the product the customer wants, I want them to decide if they want to pick it up at our store, or have it delivered to their company or home.  If they choose to have it delivered, I want a menu to appear where they choose the zone that they are in.  The webpage I have been playing with is http://www.lawnangels.com/requestquote/deliveryorder.php .  My css has a div that includes the <tr> for Zone and the dropdown menu that has visibility: hidden; but as you can see, that isn't working.

             

            Any help is appreciated!  Thanks!

            • 3. Re: show if menu selection from with in form help
              AnnieWannie Level 1

              I found my answer, so I wanted to update this in case someone else is looking.  The answer that I found is not right for this section of the forum, but here is what I found.  The answer was from http://javascript.internet.com/forms/field-show.html which gave very useful code.  I left the Javascript before </head>  as is:

              <script language="JavaScript">
              <!-- This script and many more are available free online at -->
              <!-- The JavaScript Source!! http://javascript.internet.com -->
              <!-- Original at: http://hotarea.com/ -->
              <!-- 
              function showDiv( id ) {
                  document.all.textBox01.style.visibility = 'hidden';
                  document.all.textBox02.style.visibility = 'hidden';
                  document.all.textBox01.value = '';
                  document.all.textBox02.value = '';
                  document.all[ id ].style.visibility = 'visible';
                  document.all[ id ].focus();
              }
                  -->
              </script>

               

              But then I changed my form from the code provided so I could have a menu or simple text, depending on whether someone chose to pick up or have the materials delivered:

              <input type=radio name=radioBtn onClick="showDiv( 'textBox01' );"> Pick-up
              <div id="textBox01" size=65 style="visibility:hidden">Pick-up at our store location  in Hudson, MA</div>
              <br><strong>OR</strong><br>
              <input type=radio name=radioBtn onClick="showDiv( 'textBox02' );"> Delivery
              <div id="textBox02" size=20 style="visibility:hidden"><select size="1" name="Zone" style="font-size: 9" onchange="doZone(this.form)">
                          <option selected="selected" value="0">Zone</option>
                          <option value="Arlington">Arlington</option>
                          <option value="Bedford">Bedford</option>
                          <option value="Belmont">Belmont</option>
                          <option value="Boston">Boston</option>
                          <option value="Brookline">Brookline</option>
                          <option value="Burlington">Burlington</option>
                          <option value="Cambridge">Cambridge</option>
                          <option value="Concord">Concord</option>
                          <option value="Dedham">Dedham</option>
                          <option value="Framingham">Framingham</option>
                          <option value="Lexington">Lexington</option>
                          <option value="Lincoln">Lincoln</option>
                          <option value="Malden">Malden</option>
                          <option value="Marlborough">Marlborough</option>
                          <option value="Maynard">Maynard</option>
                          <option value="Medford">Medford</option>
                          <option value="Natick">Natick</option>
                          <option value="Needham">Needham</option>
                          <option value="Newton">Newton</option>
                          <option value="Norwood">Norwood</option>
                          <option value="Peabody">Peabody</option>
                          <option value="Somerville">Somerville</option>
                          <option value="Sudbury">Sudbury</option>
                          <option value="Waltham">Waltham</option>
                          <option value="Watertown">Watertown</option>
                          <option value="Wayland">Wayland</option>
                          <option value="Wellesley">Wellesley</option>
                          <option value="Weston">Weston</option>
                          <option value="Westwood">Westwood</option>
                          <option value="Woburn">Woburn</option>
                        </select></div>

              <p><center>
              <font face="arial, helvetica" size"-2">Free JavaScripts provided<br>
              by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
              </center><p>

               

              Hope that helps someone else!