Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Is there a select object with free text? Topic is solved

Questions related to using nuBuilder Forte.
Post Reply
Timo
Posts: 219
Joined: Thu Mar 15, 2018 9:26 pm
Has thanked: 1 time

Is there a select object with free text?

Unread post by Timo »

Hi all,

I need a dropdown (kind of select object) from which I can select a city, for example. But you should also have the possibility to enter any other city.
The lookup object is out of the question, because I don't want you to add other cities there, which every other user will see. How can I do that?
admin
Site Admin
Posts: 2822
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 29 times

Re: Is there a select object with free text?

Unread post by admin »

Timo,

You can use an Input:nuScroll Object.

https://wiki.nubuilder.cloud/ ... ab_-_Input


Steven
Timo
Posts: 219
Joined: Thu Mar 15, 2018 9:26 pm
Has thanked: 1 time

Re: Is there a select object with free text?

Unread post by Timo »

Hi,

I read that you can now also use a html datalist. In what format do I enter a list of values / what format is expected?
kev1n
nuBuilder Team
Posts: 4416
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 74 times
Been thanked: 472 times
Contact:

Re: Is there a select object with free text?

Unread post by kev1n »

Hi,

The datalist field expects an array like:

Code: Select all

["value1", "value2", "value3"]
or

Code: Select all

[25,465,587,2525]

or even value/text pairs:

Code: Select all

[
    ["A", "Description for A"],
    ["B", "Description for B"],
    ["C", "Description for C"]
];

... and you can use the JS function nuAddDatalist() to add a data list to an input object:

Code: Select all

var dataList = [
    ["A", "Description for A"],
    ["B", "Description for B"],
    ["C", "Description for C"]
];

nuAddDatalist('nuSearchField', dataList);
Timo
Posts: 219
Joined: Thu Mar 15, 2018 9:26 pm
Has thanked: 1 time

Re: Is there a select object with free text?

Unread post by Timo »

thanks, got it :D
Post Reply