Multiple choice implementation

joyanta sen asked on October 27, 2018 00:20

Hi, I am creating a custom filter control. And one of the field in filter has multiple check boxes. Could you please let me know how to create that multiple check boxes and how to bind that with list of options(coming from database).

Thanks.

Recent Answers


Brenden Kehren answered on October 27, 2018 07:20

I highly suggest reading through the documentation regarding Faceted Search. You can create a simple query to get your data. It must include output which looks like this:

Index field name;Value of the field;Displayed text

0 votesVote for this answer Mark as a Correct answer

joyanta sen answered on October 28, 2018 20:05

Hi, My requirement is to find location of a bank in the google map based on the search filters. And the search filter contain a Textbox(which takes the zip code or location name) and multiple check boxes(which represent the various branches).

So will I be able to utilize search filter web part in this scenario?

Thanks.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on October 28, 2018 22:03

Well you asked how to implement multiple check boxes for search, not that you want someone to write the code and program a Google Maps locations search.

0 votesVote for this answer Mark as a Correct answer

joyanta sen answered on October 28, 2018 22:18

What I asked was how do I bind the multiple check boxes from code in custom filter control? And I am not sure which statement from my post is asking some one to write the code.

Thanks.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on October 29, 2018 04:48

Specifically regarding the checkboxes, if you're able to get that data out of the database dynamically then do what I initially mentioned and read the facated search documentation. It has info on how to get queries created to properly output the data needed to create the checkbox list with values and display names.

Secondly you need to find out how you're going to associate the branch/location with your zip code search. What will happen when you search for a zip code then check branches left in the search results?

It doesn't seem feasible to have a zip code search along with a checkbox list of brances. It seems more likely you'd have a search box for zip or name and diplay a list of branches found with links to their detail page.

0 votesVote for this answer Mark as a Correct answer

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