How do I create a dependant drop down in a web form?

I am trying to add a web form to a web page that includes a dependant drop down menu. For example, I'd like there to be a drop down menu called "Interested Class" with three fields: "Tribe Fit", "Tribe Life" and "Tribe Core". When a user selects one of these fields ("Tribe Fit" for example), I want a new drop down menu to appear with the following choices: "7:00am", "12:30pm", "7:00pm".
I have attempted this here and as you can see it's not working at the moment. The time drop down fields should be hidden until an "Interested Class" has been selected.
http://www.cityfitness.com.au/nicole-form-test?Preview=True
I've placed my JS code in the HTML view of the actual web page as I noticed when I place it in the actual custom form it doesn't carry through to the page. I don't know if I'm placing my JS in the correct place though.
Here is a snippet of my code if it helps:
<tr>
                        <td><label for="CAT_Custom_328771">Interested Class</label><br />
                        <select name="CAT_Custom_328771" id="CAT_Custom_328771" class="cat_dropdown">
                        <option value=" ">-- Please select --</option>
                        <option value="Tribe Fit">Tribe Fit</option>
                        <option value="Tribe Life">Tribe Life</option>
                        <option value="Tribe Core">Tribe Core</option>
                        </select>
                        </td>
                    </tr>
                    <tr>
                        <td>
                        <div id="fit" class="times">
                        <select>
                        <option value="7:00am">7:00am</option>
                        <option value="12:30pm">12:30pm</option>
                        <option value="7:00pm">7:00pm</option>
                        </select>
                        </div>
                        <div id="life" class="times">
                        <select>
                        <option value="7:00am">7:00am</option>
                        <option value="8:00am">8:00am</option>
                        <option value="11:30am">11:30am</option>
                        </select></div>
                        <div id="core" class="times">
                        <select>
                        <option value="8:00am">8:00am</option>
                        <option value="11:30am">11:30am</option>
                        <option value="12:30pm">12:30pm</option>
                        </select>
                        </div>
                        </td>
                    </tr>
                    <tr>
                        <td><input class="cat_button" type="submit" value="Submit" id="catwebformbutton" /></td>
                    </tr>
                </tbody>
            </table>
            <script type="text/javascript" src="/CatalystScripts/ValidationFunctions.js"></script>
            <script type="text/javascript">
$(function () {
    $('#CAT_Custom_328771').change(function () {
        $('.times').hide();
        $('#' + $(this).val()).show();
//<![CDATA[
var submitcount67919 = 0;function checkWholeForm67919(theForm){var why = "";if (theForm.FirstName) why += isEmpty(theForm.FirstName.value, "First Name"); if (theForm.LastName) why += isEmpty(theForm.LastName.value, "Last Name"); if (theForm.EmailAddress) why += checkEmail(theForm.EmailAddress.value); if (theForm.HomePhone) why += isEmpty(theForm.HomePhone.value, "Home Phone Number"); if (theForm.HomeAddress) why += isEmpty(theForm.HomeAddress.value, "Home Address"); if (theForm.HomeCity) why += isEmpty(theForm.HomeCity.value, "Home City"); if (theForm.HomeState) why += isEmpty(theForm.HomeState.value, "Home State"); if (theForm.HomeZip) why += isEmpty(theForm.HomeZip.value, "Home Zipcode"); if (theForm.HomeCountry) why += checkDropdown(theForm.HomeCountry.value, "Home Country"); if(why != ""){alert(why);return false;}if(submitcount67919 == 0){submitcount67919++;theForm.submit();return false;}else{alert("Form submission is in progress.");return false;}}
//]]>
</script>
        </form>
Can anyone please help explain to me how I can make this work? I am only a JS beginner - so please try to explain in simple terms if possible.
Thank you!
Nicole

This wont work, Needs to be a lot more then this and CSS to hide things rather then script hiding them.
Nicole, The times that are availible I gather differ depending on the type of the dropdown?
You do not need multiple time dropdowns.
Steps you need to do first on the form:
1. Ensure the custom form field dropdown for interested class exists.
2. Have custom dropdown with all the times that any of them can be. This is CSS hidden by default.
3. Also CSS hide all the options in the select as well in your CSS.
Next can you show what classes have what times as an example then can put the code more relevent to your example you can work off.
The code will follow along the lines of....
Dropdown On Change
          If selected options is xxx class then
          fade in option times  dropdown 
          Show these otpion times
        if selected option is zzz class then
          fade in option times dropdown
               show these times
More control as you need to work properly, only two dropdowns needed.

Similar Messages

  • Creating a dependent drop down box in an interactive form?

    Hello -
    I'm pretty new to Acrobat and not fluent with JS (I'm a chemist), so please forgive me if this seems a silly question:
    I'd like to create a form wherein there are two drop down boxes and the choices seen in the second of the two are dependent upon the choice made in the first. An example of such might be a list of departments in the first field and a list of staff in the selected depertment in the second field.
    I'm using Acrobat ver 7.0 (Pro) with Designer, by the way.
    I've been able to do this in Excel through use of validation functions, but I'd like to get away from Excel if at all possible.
    Thanks very much in advance!
    Chris

    To keep the department/cities sample; i'll try to explain you how i did it in Designer:
    I created a "variable" bloc (at the bottom of the Hierarchy tab) called Cities
    An other one called Departments
    A last called CitiesFunctions
    In the Cities bloc, i declared an array with all cities.
    In the Department bloc, I declared an array by department. In each array, i have 2 items : the index of the first city of the department in the cities tab and the index of the last city of the department in the cities tab.
    On my form, I created a dropDownList called Department (populated with departments) and an other called cities initialized empty.
    On Department change event:
    I rase the cities field.
    I call my function getCitiesByDpt in my CitiesFunctions bloc with the department in parameter.
    In these function I call the array corresponding to the department in the Cities bloc and I populate my listBox cities by the results (tab of cities from parameter 1 to parameter 2 of my Department array).
    Carrefull : if a list has too much items, you should create a "manual list" composed of 1 textField, 1 button, 1 listBox (it's better for performance)
    After than, always by script, you can restrict you second list by the sequence of characters eventualy keyed in the field Cities.
    I hope i'm a little beat clear ! it's hard to explain in a forum (and sorry for my french english...:))
    Pierre.

  • How do I create hyperlinks in drop-down box....  (see details)

    I'm creating a form that will be used as an employee performance review.  On page one of the form, I'd like to insert a drop-down box titled "JOB TITLE" and there will be approx 10 different job titles in the list that the VP can select from.  Depending on the job title that the VP selects, I'd like a hyperlink that takes him to a new page within the pdf document.
    For example, the VP is going to complete a performance review for a "General Mgr" on his/her team.  He selects "General Mgr" from the drop down list in the "Job Title" box, and when he does, a new page opens that has questions related to the job responsibilities of a "General Mgr".  If the VP had selected a different Job Title, such as "Area Mgr", then a different page would have opened up with questions related to the job of an Area Mgr, which would be different than a Gen Mgr.
    Can anyone assist me with this?

    Hi,
    Here are some resources that you might find helpful:
    http://www.adobe.com/go/learn_lc_scriptingBasics
    http://www.adobe.com/go/learn_lc_scriptingReference
    http://www.adobe.com/go/learn_lc_formCalc
    http://www.adobe.com/devnet/livecycle/articles/Adobe_XML_Form_Object_M odel_Refer ence.pdf
    http://www.adobe.com/devnet/acrobat/pdfs/lc_migrating_acrobat_xmlform. pdf
    And a very handy resource (and while it is for version 6 it is still very good because of the way it is laid out):http://partners.adobe.com/public/developer/en/tips/CalcScripts.pdf
    The help file also helps with syntax and LC Designer comes with templates/examples.
    Lastly, check out the Developer's Network on http://www.adobe.com/devnet/livecycle/
    In the sample the script is in the exit event of the dropdown. You can view the script by selecting the dropdown, which is on the Master Page and viewing the script editor at the top of the workspace. If the script editor is not open, you can open it from the Windows menu. By default it is only one line high, so I would recommend dragging the bottom bar so that you see a good few lines. You can view different events in the script editor and set the language.
    Also if you look at the dropdown you can see in the Object > Field tab that I have set the values that are displayed in the dropdown and in the Object > Bindings I have not specified bound values, so I can use the display values in the script.
    In the hierarchy I have named each of the pages with a unique name (eg appendixAdmin), that is also used in the script.
    I hope that helps,
    Niall

  • How can I create a rollover drop down menu from a link in Dreamweaver CS5?

    Hello all,  I am working on a portfolio website and I was just wanting to know if there is any way that I can create a drop down menu from a text link that cascades once the cursor has made contact with the link. I would like to have it in my navigation bar where the Portfolio link is. Basically, my navigation bar looks like this : Home | Resume | Portfolio | Contact. I only want three items on the drop down menu beneath the portfolio link: Traditional Art, Photography, Graphic Design. I would really appreciate any help I can get! Thanks!

    Have a look at what Nancy does http://alt-web.com/DEMOS/CSS-Horiz-menu-2.shtml

  • Dependent Drop-Down Menu in Dreamweaver CS3 and ADDT

    Hi All,
    I have been trying to create a dependent drop--down menu so that when I select an item the corresponding information would populate the other field or fields. So far I have tried to use the tutorial posted on the link below by Waleed Barakat but I have had no sucess.
    http://www.tutorials-expert.com/tutorial/20354/-How-To-Create-Dependent-Dropdown -ListMenu-Forms.html
    I wanted to know if anyone has something else that I can review to help me in this process.
    Thanks

    Please refer to this article (http://forums.adobe.com/message/1069624#1069624) for information on how your tables should be set up.
    Date: Wed, 10 Jun 2009 00:49:28 -0600
    From: [email protected]
    To: [email protected]
    Subject: Re: Dependent Drop-Down Menu in Dreamweaver CS3 and ADDT
    Hi Georgev63,
    I followed the instructions to the link you sent me and it did not produce the results I had hope for.
    The directions are pretty straight forward and I attempted the steps several times with the same results.
    Basically the field that supposed to be the detail field is blank rather than having the ID of the master field.
    Any further suggestions would be much appreciated.
    Thanks
    E.
    >

  • Drop down in a PDF form

    Hi forum,
    I'm usign a BADI in ABAP to fill a PDF form.Is there a way you can create a dynamic drop down list in  your form dynamically with values you read from the dictionary table?
    Thanks
    Zola

    It's probably easiest to do the updates with JavaScript. If you define an array that contains the items in the list, you can quickly update list boxes and drop downs using the field.setItems method: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.752.html

  • ADDT Dependent Drop Down

    I have a dependent drop down set-up on a edit page. the detail drop down is not required so if i load a page with data with the the Master Drop down that has predefined option selected but the Detail drop has none, the detail drop has no options in it. The only way to get options in the detail drop is to change the master. Is there a way to invoke the the detail options dependency on the page load??

    I think that NO because you must select some item on the master drop down to populate the detail drop down.
    Still in this case, how your form will know what to show on the detail drop down?
    If you want to make something when page loads, you have to create a starter trigger.

  • SharePoint Hosted App - Creating cascaded drop down on hosted web lists

    Hi,
    I have created an SharePoint Hosted App(Javascript Object Model) that creates lists on the host web.
    I need to put some javascript into new and edit forms in order to create the cascaded drop down effect on 2 lookup fields.
    Can you please give me some advise?
    Regards,
    Marian

    Hope below article should help you
    http://blog.pentalogic.net/2010/11/editing-the-sharepoint-list-item-menu-part-2-using-javascript/
    http://www.getinthesky.com/2014/03/hide-text-field-sharepoint-form-using-jquery/
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/030471b2-d19a-470f-9a9e-0fd8a229138b/how-do-i-create-a-new-item-form-that-allows-to-save-and-continue-editing?forum=sharepointcustomizationlegacy

  • Creating a new drop down menu when an option in an existing one is chosen

    I’m using Coldfusion 9,0,0,251028 on Windows 7 64-bit, with a Microsoft Access 97 database. 
    I’m having a problem with using a drop-down menu to create another one below it once a certain option is selected
    (in this case, the option named “Breaking News”, which has an id of 31).
    What event trigger should I use to create a drop-down menu underneath the first one when “Breaking News” is selected? 
    Should I be using Javascript for something like this, or can Coldfusion handle it?
    Here’s the code:
    <cfquery name="get_info" datasource="#db#">
    select * from lists
    order by department asc, list asc
    </cfquery>
    <div align="left">
              <select name="list">
                     <option value="-1" selected> --------------------------------------  
                     <cfoutput query="get_info" group="department">
                            <cfoutput group="list">
                 <cfif list neq "Breaking News Cell Phone">
                         <option value="#id#">#list#
                 </cfif>
                            </cfoutput>
                  <option value="-1"> --------------------------------------
                     </cfoutput>
              </select>
    </div>

    Depending on the details, I might use ColdFusion to create the content of the second drop down.
    The second drop-down is supposed to be an expiration date that gets attached to the message so it can be self-removing.
    The first drop-down is to specify a category for a message to be sent out on.
    In this case, the only one that needs the secondary expiration drop-down is a single category (Breaking News),
    so all other options on the drop-down would have to not trigger the expiration date drop-down showing.
    In that situation, would you use ColdFusion to create the second drop down?

  • 'Weird' Terminology: rigs, snapshots and checkboxes/My odyssey, to create a simple drop-down menu ;)

    The Preface
    I'm a hobbyist! "Daddy does movies", enthusiastic about the -zillions of features, tools like FCPX and Motion5 offer! I'm no designer, no engineer, no 'pro'. My goals are sky-high, results more down-to-earth
    This is no request for help, just to share my … quest for a 'simple' effect. Or feature… Or box.-
    In hope, it helps YOU to solve your problems…
    The Issue
    Simple: I wanted to create my very own 'title' template for FCPX. Concept: a lil' animation, the two teams logos reveal a lower third, showing the actual score. Plus, an insert showing the scorer (=my kids love to see themselve in such 'sports graphics' )
    Usually, I 'manufacture' such graphics as single Motion-Projects. This time, my goal was a template, my kids slaughtered in the first season's game the other team by 11:1 (which is in soccer…  a goal-fest) To 'built' each Title manually as individual Projects would spend too much time. I needed a template! … so, step #1: using a Dropzone for opponents logo - easy. Animating - been there, done that, easy.-
    But that 'show players face&name' … 18 team-members… wouldn't it be nice to have some 'drop down menu'?
    How to accomplish that?
    The Manual, with all respect, is written for experts. Describing ALL options in one sentence. I need a cookbook, step-by-step-instruction … My preferred source of imagination, MacBreakStudio/rippletraining/Mark Spencer, hasn't done a tutorial for 'drop downs' yet.-
    My guts told me, it has something to do with 'rigs' …
    The Rig
    I dragged my folder with player-pics into my Motion5 project; there, I could check/uncheck each player. But I wanted these 'boxes' avail in FCPX, I wanted to 'publish' this check-list. Trying 'tis&'tat, I noticed, I can apply to the opacity of each player-pic a Rig. And a Checkbox-rig - hey, that close!!
    … soooo?
    No 'checkbox' in FCPX after publishing my title. No list after publishing to FCPX! What have I done wrong?
    The Snapshots
    I was confused by the meaning of  'snapshot'! … and since it made "ping!" in my head, it's so simple:
    As I would done it in a 'manufactured', single Motion project, I have to select each team-member, create a New Snapshot, set opacity to show only this player; create another New Snapshot, showing a diff. player. … and so on, and so on.
    … for sure, for convenience I renamed each Snapshot to each Player's name…
    In my amateurish mind, I had the imagination, Motion5 would offer me a 'behavior' (or 'filter' or whatever) to create checkboxes; or drop-downs; … uhm, well it does, but for me the work-flow is back-to-front: first creating a status-quo, then tell 'this is option#1/#2/#3' … I had the idea, you can select first an 'empty box', then drag its content into it. I've learned: professional don't tic this way.
    Eighteen Snapshots later …
    The Result
    After publishing my hand-crafted Title, it appears like that in FCPX:
    The Dropzone is to apply the actual contestants team-logo; the 'Title' is the score, just type the number; and - finally! - I had my drop-down-menu, listing all players,  for simple selection.- Me happy … !
    In movin' images:
    http://youtu.be/wIeu1cVMu94
    As mentioned before: the design isn't meant to win a price; and most probably, there are 'shorter ways to Rome' … so, if any of you 'pros' like to comment or recomment a 'better', in terms of 'easier' way, don't hesitate to teach me!
    K.

    Motion-guru Marc Spencer from rippletraining.com has an episode upon Rigging at MacBreak Studio
    MacBreak Studio - Episode 151: Setting up a Rig in Motion 5 for Final Cut Pro X    
    … I'm no expert (as you notice in my first post ), but I'm really overwhelmed by the endless options, esp. in correlation with FCPX… on first sight, 'rigging' looked like 'bundled color sliders' to me, but by creating your very own drop-down menus you can create extremely powerful tools, handcrafted for your very own needs.
    For sport-reports, with its tons of statistics and inserts, you can create a box of 'title genrators' - once done, multiple times used, and extreeeemly fast then.
    … And when a 'nnob' like me manages it, it is really no rocket-science…
    Kudos to the DevTeam at Cupertino!!!

  • Default values for dependent drop down menu

    Hi!
    I did create an insert record page that lets the user put in information using text fields. In addition the form has a dependent drop down menu for a category and then depending on the chosen category, the user is presented with choices in a second drop down menu for subcategories.
    The insert of the record itself works fine.
    The records are then listed in a table. A link to a details page should then list all fields of a chosen record. I have another form sporting them dependent drop down menus again. Since I retrieve a record from the database I would like to have the drop down menus default to the values stored in the database.
    But whatever I tried the menus always default to the respective first entries in each menu.
    I tried to use the "select value equal to" field in the "insert record" for the category and the "Default detail value" field in the dependent drop down item for the subcategory field.
    Any pointers anybody?
    Thanks in advance
    Juergen

    Hi there I cannot understand your request fully but I think I understand....
    I think I have done nearly exactly what you need
    I will try to explain
    for a start I am working on a art gallery site that has many different artists and many different paintings
    I am able to add a new artist and have that artist name appear automatically in a dropdown menu on my add painting form page so that when I add a new painting I do not have to type the arrtists name every time
    I am not sure this is what you need but I think maybe....
    (i have another site that displays different categories of jewellry... with a form that has same dropdown and can choose product category.... but the process is the same)
    the way I did it was to first create an 'artist_info' table in my database and an 'add artist page' pretty simple
    Then an painting_pnt table in my database and an 'add painting' page with a form that contains a dropdown menu that is dynamically populated from the artist_infotable... label from the artist_name field value from the artist_id field so the form uses two recordsets.......
    Then in my painting_pnt table I have a field that stores the artist_id
    So when I add a new artist..... the name automatically appears in the dropdown menu when I add a new painting I choose the artist name and then later I can filter recordsets on my detail pages using the id_artist....
    there is a lot more to it as well but that should get you started
    I hope this helps
    If you have any questions at all I will try to explain better
    takiteasy

  • Can you make dependant drop down lists?

    can you make dependant drop down lists?

    Yes, you can create main menu and sub menu items , with default menu the sub pages will auto create sub menu items (you should select all pages from menu type option).
    These videos will help you :
    https://www.youtube.com/watch?v=hncVlzYuuvQ
    https://www.youtube.com/watch?v=kziCEqQpF9s
    Thanks,
    Sanjit

  • How can I display images in drop down.

    Hi All,
    How can I display images in drop down.
    <select><option>image here</option></select>
    please reply soon.
    anser please
    Thanks

    I have not found html forum..That's just incredible.
    where can i find it ?Sorry, I'm still recovering from that remark.
    please reply soonEvery time you end a post with this, or "urgent" or other such keywords, the forum automatically introduces a 5 minute delay so that will actually make the whole process slower (not faster).

  • How to get "tones" tab  in drop down menu

    how to get "tones" tab  in drop down menu

    I assume that you are referring to the categories on your iTunes library (?), if you are then go into Edit > Preferences and on the General tab make sure that Tones is ticked
    You can also enable the left-hand sidebar on iTunes 11 on a PC via control-S, which then allows you to view the sections of your library (those enabled in Preferences) via that sidebar, and if you have iOS devices they will also show on that sidebar when connected.

  • Help with Dependent Drop Down

    I have been trying for weeks now to get a simple dependent drop down to work. The form works perfectly (including dependent field) when I am inserting data. However when i am updating the dependent values are not passing some reason. I can figure out why. I have even started afresh and the same results. Can some one please send me a sample of their form using dependent drop down with your database dump. I want to compare to see what is going wrong.
    Thanks in advance.

    hi leocrawf,
    can you please give me direct link of your page, or send it to me at:
    [email protected]
    when updating the record with the dependent dropdown menus it should have the default value matching the records you trying to update, also the forign key btw them...
    any way i have more than example, so please send me alink or upload the page to me...
    http://www.developer-online.com
    waleed barakat...

Maybe you are looking for