I'm using the Create Item save action in a web form. I have a checkbox list that points to a folder containing category items. This is mapped to a Multilist field on the item template that it will create when the user submits the form. But it's passing the checkbox text, not the value, so the multilist for each new item created has bad data in it. Does anyone know how to set the checkbox list to pass the values instead? I'm kind of surprised it's doing this in the first place.
相关问题
- How to pass “[Sitecore Mobile SDK] Data from the i
- How can I remove duplicated page events in Sitecor
- Spoof an IP address to test GEOIP lookups with Sit
- How to get a Multilist with Search field to not di
- Page.Header.Controls.Add(control) is adding contro
相关文章
- Sitecore set/change default language from 'en&
- Sitecore OMS - achieving a goal on a form submissi
- Get number of components in placeholder, Sitecore
- Sitecore text search in PDF or Word documents
- sending data from one sublayout to another in site
- The model item passed into the dictionary is of ty
- How to implement Solr into Sitecore
- Sitecore enables accessing child node around paren
I haven't had a chance to test this, but theoretically, you could create a new field type that inherits from
CheckboxList
, and let's say we call itCheckboxListPipedValues
. The code would look something like this:In Sitecore, simply go to
/sitecore/system/Modules/Web Forms for Marketers/Settings/Field Types/List Types/Checkbox List
and duplicate that item. Then change the assembly and class to the new control. Change your form to use the new field, and ensure that the values are mapped properly. Now the output of the value should be a pipe separated list of the values which should work nicely with the multilist field.EDIT: For MVC, it's the same process, but you'll need to update the
MVC Type
in the field type item to point to your new class. The code for MVC should look something like this: