Create new item in dropdown - selectize.js

I am new to selectize.js and like it very much!
I am trying to allow user to add newe value to dropdown.
I have "create: true"
Unless I misunderstood the Configuration chart on the Usage tab, that is all I needed to set.
I expected to see the value that I typed in the dropdown (and database), but that did not happen.
Am I misunderstanding something?
I am accessing the data for the dropdown via ajax calls.
Thanks!

Related

Conditional dropdown selection to hide and show item

I'm new to Power Apps, I'm facing this issue.
enter image description here
This is a PA form when I select Projects value in Time entry field the below two fields are enabled Project and Project Role but when I change to other option like this
enter image description here
Project and Project role are hidden for other option selected except Projects option in time entry field. 
Everything is working fine but problem is coming when I edit any existing records of list and try to change the Time Entry field option when I'm changing the option from Projects to other options the below two fields disabled automatically which is fine but when I save this form after making changes the value of Project and Project Role remains in list which was existed for Projects option before editing.
So what I need here when I edit the existing records so value of Project and Project Role also wipe from SharePoint list when I select options other than project in time entry field.
Thanks in advance.
Forms on PowerApps are defined by cards. Cards have two important properties.
Default, which is the value you pass into the fields and show to the user. Usually this is just the value of the source
Update, which is the value you write back to the source. Usually, this is just the value of the field
You can do a lot by modifying default and update, which allow you to do all sorts of checks and logic on how different data should be transformed.
In your case, set the update value for project and project role to this
If(Self.DisplayMode = DisplayMode.Disabled, Blank(), dropdownvaluehere)
Whenever that card is disabled, it will write nulls to the list, regardless of what the dropdown says. Whenever the card is enabled, it will refer to the dropdownvalue.
As an aside, Consider using a dropdown box instead of a combobox if not necessary, as comboboxes have nice features like letting you select more than one value at a time, but tend to be more temperamental and break and forget values.

LabelListAttribute example?

I have a field in a Database that is set as a varchar(1), and it is bound to a non editable textbox in acumatica. I would like it so that when the value of the field is equal to 'A', the value displayed in the textbox in Acumatica is something longer such as 'Apple'. The user will not be editing the textbox so I do not need this to work in reverse.
From my research, I see that LabelListAttribute might be the attribute I am looking for. Can anyone give me an example on how one creates a new 'LabelProviderType' or 'LabelValuePair' to feed into this attribute.
Additionally, am I just better off in copying the combobox example from the T100 class (Page 76) and disabling it? I would rather this work within a textbox
Thanks
For the use case you are describing you should indeed use a PXDropDown control bounded to a DAC field decorated with PXStringList attribute as described in T100 Configuring a Combo Box example.

In CRM 2011, hiding picklist values to other users

Values visible to Owner
Hi I know how to hide the values in textbox as shown above,But no idea how to hide values similarly in the picklist.If anyone have any idea please guide me.
There is no option to "Password hide" the text in a pick list. You do have a couple options though:
Hide the field completely using the CRM setVisible javascript method. Set the code to run on the onload of the form. A slightly more "secure" version of this is to initially mark it as invisible in the CRM Form Editor, then make it visible for the users that need it visible.
Create a new form that doesn't even contain the field for the users that don't need access. This is the most "secure" method, but it requires the security to be role based, and it looks like you need it value based.

Xpages - How to save values to list box that have been entered by client side javascript

I have a list box that I am adding and removing items with client side javascript. The issue is that these new values are not being saved to the list box(binded to field). The only value that comes back is the original one that was set in list box. The values are all there on the client since I can loop through the array. How can I get these values to replace the value that is currently there?
By default the listbox have a validator that you may not see during save, (you need to add error controls to see it) and the validator do not accept new values added using CSJS
If you set disableValidators="true" in the listbox control you suppress the validator and the save works fine. you also need to select the entries in the listbox using CSJS before you save,
Credits goes to Jesse Gallagher
Thomas
In the List Box properties, you must to set mutiple = true

Sharepoint 2007 : How to disable TextBox

I am new to sharepoint 2007. I have a following requirement.
1) I would to create a custom list for employee where they can select the item and fill-out the form and submit.
Example : List --> Hard Disk --> Click --> Create new list -->
List has following fields 1) EmpID 2) Customer name (Text) , 3) Order Date, 4) Qty 5) Price
Once user submit the list then I would like to disable the EMPID field and allow same user to edit the other fields if required.
How can I disable the text field (Empid) in the Sharepoint 2007 ? I would appreciate any other alternate or better idea.
Thanks,
Regards
Vick
I would use jQuery for this purpose. Here is an example that describes how to hide a text field on a SharePoint form. Change the .hide() to .attr('disabled','disabled') and this will disable the text field.
If you need help with deploying jQuery, see this question.
I am not sure its a better idea or not, but for that i used to do for this common scenario
that
fist identify the textbox id in html source (through web browser view source) after that i wrote javascript function to disable textboxes i.e. EMPID or we can do through style sheet and apply style using javascript..
You can create multiple content types for the same list. Have the user fill out the content type that contains the EmpID field (put a link in the LeftNav that sends them to NewItem.aspx with the proper ContentTypeId). Make the default content type the one without the EmpID, so when they go back in and edit they won't see that EmpID field.
The downside to this is that they'll see both content types in the New button dropdown. You can name them in a way that makes sense (New Hard Disk Order, Edit Hard Disk Order)

Resources