You are viewing limited content. For full access, please sign in.

Question

Question

Is there a way to create a dual listbox in a modern form?

asked on October 14

I have a requirement to create a dual listbox in a form.  This is one where there are two listboxes and two buttons with a left and right arrows between the listboxes that allow you to move selected items from one listbox to another?  I have tried using dynamically created select lists in an html object but while I can populate it using entries from a drop down menu, when I try to select from the select list, I get a null value.

I have also tried using CSS to make a dropdown menu look like a listbox but was not successful.

Has anyone had success in doing this? 

Currently using version 11.

 

0 0

Answer

SELECTED ANSWER
replied on October 15

Checkbox would be perfect for that. They offer the ability to not only check the box but also click the label to check the box. 

Within the LFForm object you could just listen to onFieldChange, but you mentioned wanting two buttons between the tables to do the move from table 1 to table 2 so you wouldn't need to know what in table 1 was selected until they click the arrow to move the items. Of course with the former you could do it automatically, but that could be a weirder interaction for the form filler 

0 0

Replies

replied on October 14

You won't be able to do this without javascript. I would use two tables side by side with a button between them that copies selected items from table 1 to table 2. This should be pretty straightforward if you're familiar with JS and the LFForm object 

https://doc.laserfiche.com/laserfiche/en-us/Content/Resources/BusinessProcesses/Javascript-and-CSS/TheLFFormObject.htm?Highlight=lfform#addRow,addSet

0 0
replied on October 14

Thanks for the reply Zachary.  If we are talking about a Laserfiche table rather than a HTML table, how would the javascript capture which table entry (or Row) the user clicked on and selected?

0 0
SELECTED ANSWER
replied on October 15

Checkbox would be perfect for that. They offer the ability to not only check the box but also click the label to check the box. 

Within the LFForm object you could just listen to onFieldChange, but you mentioned wanting two buttons between the tables to do the move from table 1 to table 2 so you wouldn't need to know what in table 1 was selected until they click the arrow to move the items. Of course with the former you could do it automatically, but that could be a weirder interaction for the form filler 

0 0
replied one day ago

Thanks Zachary. Using two checkboxes with two html buttons to move entries right and left worked for me.

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.