Dynamic Drop Down

puggles 22 Jan, 2013
Hi,

I am very new to this and i have looked through numerous postings but i just want to do a simple dynamic drop down with the following

What competition would you like to enter?
- > Competitive (1) --- > Saturday (1a)
--- > Sunday (1b)
- > social (2) --- > Tuesday (2a)
--- > Thursday (2b)

Can you please advise of the process using the wizard as i am not good with coding. I have read the tutorial on the dynamic double drop down without using AJAX but i am still getting confused as it doesnt walk you through the wizard options to do so.

Much appreciated.
GreyHead 25 Jan, 2013
Hi Puggles,

Here is the Help content from the Dynamic DropDown action:

[list]

  • Enter the IDs of both the source and target dropdowns.


  • Configure the static options string data.


  • The options string should be in multi line format, each line will has 1 source value and multiple target values, example:
        source_value_1:target_value_1=Target Title 1,target_value_2=Target Title 2
        source_value_2:target_value_3=Target Title 3,target_value_4=Target Title 4



  • You may enable the AJAX and enter a new event name, make sure this event is added to the form itself, example: ajax


  • The new event output should be in multi line format, example:
        value1=Title 1
        value2=Title 2
        value3=Title 3



  • Make sure you add the PHP code below to the end of your output code in the AJAX event so that you may get a a clean response:
        $mainframe = JFactory::getApplication(); $mainframe->close();
  • [/list]



    Bob
    puggles 29 Jan, 2013
    Thanks for your response. Could you please advise where in the wizard I do this and what would be the source value and target value?
    GreyHead 29 Jan, 2013
    Hi puggles,

    This is the help from the Dynamic Drop-down action, which is in the Power Fields action Group in the Form Wizard (not in the Easy Wizard).

    The Source and Target values are the values from the Source drop-down 'Competitive, Social' and the corresponding values from the Target Drop-down 'Saturday, Sunday' and 'Tuesday, Thursday'.

    Bob
    puggles 30 Jan, 2013
    Thats done, but what do i do on the "elements" part of the wizard? i put in a dynamic box there too..how do i connect them?
    GreyHead 30 Jan, 2013
    Hi puggles,

    You have the two select drop-downs that you want to join with IDs that match the settings in the Dynamic Drop-down action.

    Bob
    puggles 30 Jan, 2013
    yep, all good. thanks for that.

    Now, pending on what has been selected from the first drop down, i only want the second drop down to appear if a secondary status is required.

    So basically how can i only make the target dropdown only visible if it was selected in the source dropdown?
    GreyHead 08 Feb, 2013
    Hi puggles,

    You'll need to write JavaScript to check the values of the first drop-down and hide or un-hide the second one.

    Bob
    This topic is locked and no more replies can be posted.