Custom drop down elements

Shawn Ebeyer asked on September 30, 2016 21:08

Hello,

I'm creating a page that will have multuple dropdowns, each containing a list of items that a user will be able to select. The content of these lists will be dynamic data that will be pulled from a database.

I'm wondering if it is recommended to use the dropdown webpart, or simply a repeater for each one of these elements.

I'd love some suggestions - and thanks in advance!

Shawn

Recent Answers


Trevor Fayas answered on September 30, 2016 21:11

I personally always use just a repeater, you never know if you may need to adjust the output or classes or add a data-attribute in the option tags that is easy to do in a repeater.

2 votesVote for this answer Mark as a Correct answer

Shawn Ebeyer answered on September 30, 2016 21:17

Thanks Trevor...

I'm thinking about using a repeater at this point. I don't really know how to use the dropdown webpart, and all of your points make complete sense to me!

Cheers,

Shawn

0 votesVote for this answer Mark as a Correct answer

Joshua Adams answered on September 30, 2016 22:54

Will this be collecting information? Maybe you can use a kentico form, and set the dropdown list data source to use a query. That way you can have multiple dropdowns inside of your form and also rig it up with dependencies.

0 votesVote for this answer Mark as a Correct answer

Shawn Ebeyer answered on October 3, 2016 16:30 (last edited on October 3, 2016 17:10)

Thanks Joshua,

EDIT: Some fields will be collecting information (input fields), however some fields will be pre-populated for a user selection (dropdowns). It's basically an advanced search page (think of a goods/services site) with dropdowns/inputs that will allow the user to select things like distance, type of product and price range.

If I were to use a Kentico form, which webpart would I use?

Thanks in advance,

Shawn

0 votesVote for this answer Mark as a Correct answer

Trevor Fayas answered on October 3, 2016 17:54

Actually then if this is a filter for a search, you should look into actually making / using Kentico's Filters, you can define a filter for an existing repeater (the product listing) and that way when they select, it applies a "where" condition automatically.

Otherwise, if this is not saving information, then i wouldn't do a form. If you were, then you would want to.

if using a Smart Search:

https://docs.kentico.com/display/K9/Using+search+filters

if applying to a repeater or data source:

https://docs.kentico.com/display/K82/Filtering+and+paging+data

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.