Multi-select dropdown

repeater-widget

#1

Hi, I’ve created the attached to test multi-select dropdowns for a new project. I’ve been playing with 2 variants. Variant1 opens to show a filterable list, which allows more than one item to be selected and it displays the count at the top. This is working fine.

With Variant2 it’s a search input that lists the result on TextChange. However, what I’m struggling with is how to make this multi-select and then display the choices back in the input as a string (e.g. Ironman, Spiderman, Superman)

I hope that makes sense!

Is anyone able to take a look and help me out?

Many thanks

Multi-select dropdown.rp (127.6 KB)


#2

Could you set Varient2’s search field as a 2-state dynamic panel inside of a repeater? Search could be a dynamic panel with two states: future list of selected heroes, and the actual search box. So, IfLast item in repeater, set dynamic panel to State2 (the search box). This would keep your search box pushed to the end.

Upon Click it would ADD that marked hero row into the new repeater… so it looks like its filling in with names but in reality it’s just showing a horizontal repeater.

You could even go as far as deleting rows when DELETE is typed into the search box to help sell the idea that its still a simple search box.

Hope that made sense.


#3

Thanks jlhelmers but I couldn’t get your suggestion to work. However, after a bit of googling I’m almost there. Please see Variant3 in my attached project.

I’ve added the following to the OnSelected action of the Mark Row checkbox. This adds a string of users to the Selections text field based on what you pick under Suggested users:

Set value of OnLoadVariable equal to “[[OnLoadVariable]] [[Item.Data]],”
Set text on Selections equal to “[[OnLoadVariable.slice(0,-1)]]”

What I can’t work out is how to remove a selection when a user is unselected. I obviously need to add a line of code to the OnUnselected action, but I’m stuck!

Please could anyone help me out?

Many thanks
Jonathan

Multi-select dropdown.rp (155.3 KB)


#4

Hi JopSmith,

It looks like my coworker Alex’s forum post may help here:

In Alex’s example file, he has a page with standard checkboxes using a repeater’s dataset to update the text string on a text field as you select and de-select those checkboxes. Hopefully that gets you close to what you’re looking for!


#5

I have updated multi-select dropdown:Multi-select dropdown counter-edit01.rp (240.1 KB)


closed #6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.