Create Template Custom Field Field in Sitecore - sitecore

I want add a custom field in a Sitecore template.
Field will be a drop down of hours (1 -23) and used to show open and close time.
Ex: 8am to 7pm.
How can I add a custom field for that?

You can use a droplist field and set it's datasource to a folder that contains numbered items 1-23.
You could also just use a plain text field and optionally add a validator, or a date-time field if you actually want the time (+date) formatted.

Related

How can I add searchable InventoryID (User Defined Field) in the Cases module of Acumatica?

How can I add a searchable inventoryID field in the cases module on Acumatica? I already added a custom field but can I make it searchable?
Is it possible to make this InventoryID User Defined Field searchable from the inventoryItem table? Screenshot Below:
You could put the [StockItem] attribute on the field if you want it to be a selector of all Stock Items. If you want to use a different query you could just use a regular PXSelector like
[PXSelector(typeof(Search<InventoryItem.inventoryID, Where<... etc.

DropList field in WFFM is showing value in message body

we have identified an issue/functional requirement that we have a droplist of countries and same goes for title like in below image
but we need that in response email body of send email save action it's Arabic text should be used instead of English value of selected option. Is there a solution or fix ? or we have to go for any customization ?
I don't think there is a way out-of-the-box to use the text instead of value. What you can do is create a custom "Send Email Message", similar to Sitecore.Form.Submit.SendMail and override the FormatMail method.
Create a list of countries items somewhere in the Sitecore Content Tree, and add a field for the text/description of the country. Then in WFFM droplist field, Set Items by: Selecting Sitecore Items and Select Root Item to the folder of the list of countries you created earlier.
You should see the countries in the preview section. Click the drop arrow for the Value and Text fields and then either select Display name or the custom field in your country item that holds the translated values.
The value submitted in form will now be the translated value correct for the language, using the lookup items list.

How to add new date format into Sitecore WebForms For Marketers (WFFM) date picker?

Is it possible in WFFM 2.4 to add own date format to date picker field? For design reasons we want format dd/MM/yy but I didn't find how to add another option to the the dropdown with available formats
Create a new item of template type /sitecore/templates/Web Forms for Marketers/Meta Data/Extended List Item in the following location:
/sitecore/system/Modules/Web Forms for Marketers/Settings/Meta data/Date Formats
It should then appear in the list of available formats.
Note however that although there is a "value" field on the item, it does not seem to be used, instead the droplist appears to use the item name. Just to be sure, set them all to the same value :)

SitecoreCMS: How to create dropdown list field with static values

I want create dropdown with static set of options. In fact it should select string value.
In Umbraco CMS is Dropdown List out of box, what is the same in Sitecore?
You can use Unbound Droplist under custom types field in sitecore. this is same as your Umbraco CMS, and assign static value by pipe separated for example country like India|USA|Canada
Below are the screenshot for more clarification
You can define your string values somewhere in the Sitecore tree as Sitecore items, e.g. put them in /sitecore/content/my-field-values as follow:
- sitecore
- content
- my-field-values
- string-value-1
- other string value
- and another one
and then use Droplist field type and set Source property to /sitecore/content/my-field-values.
Then value of this field will be name of the item, so one of your strings.
E.g. if you select string-value-1 item as the value of your field, both code samples will return string-value-1:
string value1 = item["Field using droplist field type"];
string value2 = item.Fields["Field using droplist field type"].Value;
Sounds like you need a DropLink field.
The selected value will be the guid of the Sitecore item. There is a straight equivalent - DropList this will store the item name rather than the guid.
The DropLink will be easier to work with as you can look up the selected value by id which will persist, rather than the name which could potentially change.
There's some info here on how the Droplink works with the API
Droplinks

Dropdown values customization in NetSuite

There is a custom record type configured in NS. It has a name and a free-form text field called full_name. Name is a standard field, full_name is a custom field. There is another record type which has a field of type List/Record with the previous type. On the form this field is present as drop-down. The drop-down show names of records. The goal is to show full names instead of names in the drop-down. Is it possible to mark somehow full_name field so it is available in the drop-down view instead of just name? Any ideas how to achieve this with NS?
Depending on your exact needs, it may make sense to add another custom field to the record containing your drop down. You can source this field from the full_name field on the custom record. This field does not need to store the value if it's only for display purposes.
Add a new field to the record containing the drop down
Set the type to be text
Name it appropriately
Under the 'Sourcing and Filtering' tab, set the source by field to the drop down
A field with type List/Record type can only show standard Name field. However, you can create a custom field dynamically on before record load of a user event script. Check the nlobjForm.addField. Please keep in mind that the value of it will not be saved. Saving the value is another story.