Can you include an input field in a drop down list using select-2? - jquery-select2

I am using select-2 for a list of states. I think its great and love the search input field it provides. I'm wondering though, is it possible to include another input so someone can manually enter information ~ I am hoping to add an "Other" or "International" field to this drop down so instead of including all the states / provinces / territories of the world I provide a field they can manually enter if the territiry if it's not included in the drop down list.
Is an input in a drop down even possible? I would like to try and stick with Select2 as I like the added features it provides.

You can add items manually to the select2 dropdown using the "tagging" function. See the link for more information: https://select2.org/tagging

Related

Search option in multi-select listbox document property

I am trying to create a multi-select list box document property with unique values in a column. But, I don't see a search box feature like in the default list box property.
Please advise as how should I include this option in the list box document property that I created.
For the default listbox filter, we can choose if the search option to be included or not (as shown in the screenshot below). Don't we have this option available for document property?
Thanks for your help!
You can use any Jquery Plugin (check here - Here or Here ) or any JS library like Check this .

Select or input

In my app I have a form for creating new trip. Model Trip has field finish_address. For setup the finish_address in I use select in simple form to select address from user's addressbook. But I want to make a better form: if there isn't necessary address, user can add it using input field.
So I need to make form with to types of setup finish_address. How can I make it?
You have 2 basic options.
You can use autocomplete on a text input, populating a dynamic crop-down with know values.
There are several gems available to get you started in this direction, like https://github.com/crowdint/rails3-jquery-autocomplete.
Alternatively, you can add an "other" option to a select input, populated with your known values. When the "other" item is selected, display a previously hidden text input with the same name below the select input. The "lowest" element will take precedence, for what gets sent to the controller.
In the controller, just do a find_or_create_by, using your provided value.
These options both require javascript, but you can eliminate the need for javascript if you make your select a non-db-backed attribute, and manipulate your params accordingly, as they come in to the model. This might help with validations, as well.

Adding a column to an Acumatica grid

What is the best way to add a column to a grid in Acumatica? I've looked at the documentation, and I can't seem to find a way to do it.
Thanks
It depends on the type of grid you are using. As an example, lets say you are going to add a CreatedDate column to the details grid of Journal Transactions screen.
You will need to switch to design mode and open up the Aspx Control Tree and select the PXGrid node, click Add, and select Add Column to Grid to open the Add Grid Column dialog.
Find the field you want to add (in this case CreatedDateTime). you can also create new cusomt field here by pressing Add. Pick the correct Column Editor type (like DateTimeEdit) and press OK
move the Column up and down using the left tree to put in position you want.
Validate and publish the project!
If you want to modify existing grid which was created by Acumatica you'll need following steps:
1. Add field in DB ( optional )
2. Add filed description in DAC extension
3. Add column to page in customization engine, or manually imitate behavior of customization engine

Multiple select field in LocomotiveCMS?

I need to set up a field in LocomotiveCMS that is similar to Select but allows multiple selections. Something like in HTML... does LocomotiveCMS allow for that, or will I have to do some ruby coding to get that to work?
Any help would be appreciated, thanks!
Old question but still a thing.
I'm unsure whether your question relates to fields within the Locomotive CMS Back Office or on the front end so I've addressed both below.
Front End
Irrespective of whether or not you're dealing with Locomotive CMS content types, either of the following will allow selection of multiple values on the front end:
Listbox (select element with the multiple attribute)
A series of checkbox inputs with the same value in the name property
Back Office
If you need to allow selection of multiple values within the Back Office, you can do this for content types using the has_many or many_to_many content type relationships.
If you need multiple value selection outside of content types (e.g. in metafields schema) you're unfortunately out of luck.

Delphi: Multiple tokens edit component

I'm looking for an enchanced edit component that allow users to input multiple tokens (items) manually separated by some symbol, or to select them from another source.
It's something like "TO" field in outlook or facebook that allow you to input multiple recipients.
Can anyone suggest any solution?
The way we sort of do it is to use an normal button edit box and when the user clicks the button we present a separate form (which can be made to look like a drop down box if you like) with a checklist or listview with checkboxes enabled or similar. The user selects any number of the items then when the form closes we take the list of selected items and present them in the edit as a comma or semi-colon separated list. The edit itself is read-only so all interaction goes through the separate form.
But - I really don't like the whole approach (for our app) as it doesn't look good when you have many selected items and I'm looking to find a better way of showing the selection! I suppose one option is to use a read-only memo with scrollbars to show the items.
TMS has some nice components, one of which is the TCheckListEdit which might be of use.

Resources