Hello,
Currently, the select object generates a list in a single column only. Is there any select object that supports multiple columns? I would like to have all the options in the same object rather than in multiple select objects side by side.
Thanks for your help.
Yves
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
Select object on multiple columns Topic is solved
-
- Posts: 338
- Joined: Sun Mar 14, 2021 8:48 am
- Location: Geneva
- Has thanked: 92 times
- Been thanked: 11 times
Select object on multiple columns
You do not have the required permissions to view the files attached to this post.
Re: Select object on multiple columns
Hi yves,
I asked your question, along with adding your example screenshot into grok.com.
Here's its response...
Try it yourself (the answer is bigger than my attached graphic.)
Steven
I asked your question, along with adding your example screenshot into grok.com.
Here's its response...
Try it yourself (the answer is bigger than my attached graphic.)
Steven
You do not have the required permissions to view the files attached to this post.
A short post is a good post.
Re: Select object on multiple columns
Yves,
If you want to create something that looks like a Select Object with more than one column.
Try asking Grok this...
Will get you this...
Steven
If you want to create something that looks like a Select Object with more than one column.
Try asking Grok this...
And uploading a table like this...can you create a div that looks like an HTML Select Object by creating a div I'll refer to as the MAIN div, with every row having its own div and each value from the uploaded file, sitting side by side in its own div inside the row div.
with the value column being the language column in the file.
The first row should not scroll. Include any JavaScript or CSS required in the same html file
Will get you this...
Steven
You do not have the required permissions to view the files attached to this post.
A short post is a good post.
-
- nuBuilder Team
- Posts: 4416
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 74 times
- Been thanked: 472 times
- Contact:
Re: Select object on multiple columns
Thanks, Steven! It's always amazing to see what AI can generate. I was curious whether Select2 could handle multi-column dropdowns, and a quick look at the documentation shows that we can use templateResult and templateSelection to format the display as needed.
Using nuBuilder's nuOnSetSelect2Options callback, we can define how the options appear in the dropdown.
This means we can achieve the multi-column effect directly within Select2.
This lets us show multiple columns while keeping Select2’s built-in features like search and keyboard navigation.
Attached is a sample form (select2_multi_columns_demo) that can be imported into an existing nuBuilder database.
Form Code is "select2_multi_columns_demo"
Using nuBuilder's nuOnSetSelect2Options callback, we can define how the options appear in the dropdown.
This means we can achieve the multi-column effect directly within Select2.
This lets us show multiple columns while keeping Select2’s built-in features like search and keyboard navigation.
Attached is a sample form (select2_multi_columns_demo) that can be imported into an existing nuBuilder database.
Form Code is "select2_multi_columns_demo"
You do not have the required permissions to view the files attached to this post.
-
- Posts: 338
- Joined: Sun Mar 14, 2021 8:48 am
- Location: Geneva
- Has thanked: 92 times
- Been thanked: 11 times
Re: Select object on multiple columns
Hi Kevin,
Is it possible with your solution to select only one item instead of a pair? The purpose of this feature is to display all options without requiring vertical scrolling in the list, but I’d like to be able to select items one by one.
Many thanks again for your continuous support,
Yves
Is it possible with your solution to select only one item instead of a pair? The purpose of this feature is to display all options without requiring vertical scrolling in the list, but I’d like to be able to select items one by one.
Many thanks again for your continuous support,
Yves
-
- nuBuilder Team
- Posts: 4416
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 74 times
- Been thanked: 472 times
- Contact:
Re: Select object on multiple columns
I see, you don’t want a separate column for the same item (e.g., to show additional data for an option), but instead, you want all items to be individually selectable. I’m not sure if this can be achieved with Select2—further investigation is required. Otherwise, you might want to consider a solution like the one Steven suggested.
-
- Posts: 338
- Joined: Sun Mar 14, 2021 8:48 am
- Location: Geneva
- Has thanked: 92 times
- Been thanked: 11 times
Re: Select object on multiple columns
This is exactly what I was looking for—a solution that allows me to request the content of the list via an SQL query, just like it's done with a select element. I'm building a sentence builder that uses a list of sentence fragments (see attached Usage.gif).
Yves
I have a subsidiary question: How can I implement this gentleSelect in nuBuilder? It’s proving to be quite challenging for me, so any help would be greatly appreciated!Yves
You do not have the required permissions to view the files attached to this post.
Re: Select object on multiple columns
Yves,
The job of the helpers on the forum is not to give you a fish, its to teach you how to fish.
Steven
The job of the helpers on the forum is not to give you a fish, its to teach you how to fish.
Steven
A short post is a good post.
-
- nuBuilder Team
- Posts: 4416
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 74 times
- Been thanked: 472 times
- Contact:
Re: Select object on multiple columns
You can add external resources in nuconfig.php. (See forum post)
Alternatively, you can add external resources via Setup → Header.
Usage, see gentleSelect documentation.
Alternatively, you can add external resources via Setup → Header.
Usage, see gentleSelect documentation.