3 Replies - 279 Views - Last Post: 16 June 2019 - 01:11 PM Rate Topic: -----

#1 DarenR   User is offline

  • D.I.C Lover

Reputation: 624
  • View blog
  • Posts: 4,170
  • Joined: 12-January 10

how to create a dynamic drop down list that creates other criteria

Posted 07 June 2019 - 06:21 AM

i dont know if this is even possible

what i want to do is create a drop down list, and when the user selects an item in the drop down list it will make another drop down list with a text box next to it

all the options must be dynamically created


example:

ddl1                        ddl2                                            texbox
item 1 selected              items populate here from 1 selection            textbox that must be filled out

add button pressed a new row is made

ddl1                        ddl2                                               textbox
item 2 selected             items populated from the selection                new text box


and so on


currently i have the ddl2 and textbox working prior to new iteration from the boss
he now wants that 1st ddl added

ddl2 used to use criteria from the form but now must use it from ddl1

it is a big rewrite in other words

Is This A Good Question/Topic? 0
  • +

Replies To: how to create a dynamic drop down list that creates other criteria

#2 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 15171
  • View blog
  • Posts: 60,720
  • Joined: 12-June 08

Re: how to create a dynamic drop down list that creates other criteria

Posted 07 June 2019 - 07:26 AM

Eeesh.. dynamic controls and all that?!

Can you do this with a repeater and the controls there?
Was This Post Helpful? 0
  • +
  • -

#3 DarenR   User is offline

  • D.I.C Lover

Reputation: 624
  • View blog
  • Posts: 4,170
  • Joined: 12-January 10

Re: how to create a dynamic drop down list that creates other criteria

Posted 07 June 2019 - 08:06 AM

i actually thought about using that but not sure how to implement it

reason:

the 1st ddl is the driver for ddl2 and text box
depending what is clicked on ddl1 is what causes ddl2 to populate and a text box shows up next to it.

for example
if ddl1 selection is tools then ddl2 will have tool options and text box next to it for input
if ddl1 selection is mulch then ddl2 will have mulch options and a text box next to it

new rows cant be made without checking to see if previous row has a value in the text box
Was This Post Helpful? 0
  • +
  • -

#4 smendoza88   User is offline

  • D.I.C Head

Reputation: 24
  • View blog
  • Posts: 114
  • Joined: 13-July 11

Re: how to create a dynamic drop down list that creates other criteria

Posted 16 June 2019 - 01:11 PM

What about using a lookup table in a database with the different combos? For example dropdown1 would be a list of states and dropdown2 would be the counties in the state. Then you would be able to select a state in dropdown1, query the counties for the selected state, and populate the dropdown2.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1