Fuji, I mean. I need to read the all items from dropdownlist, not just a user's selected item.
For example. In figure: dropdownlist has items a, b, c, & d. If user selects "c" and submits the form, record.GetRecordField("dropdownlist").ValuesAsString() contains "c". However if you want to put some logic on it, you need all items. For example, let say you want to know the index of the selected item.
Yeah record only contains submission, for the form design you'll need the form object :) that will contain all form details including the prevalues for the fields
Get all values from the DropDownList: contour
How to get all values from a dropdownlist on contour, Is there any contour API?
For example. I need to get values "a,b,c & d" from the dropdownlist type.
Using record.GetRecordField("dropdownlist").ValuesAsString() contains only the value that is selected by the user when they submit the data.
Thank you
Jeevan
What do you mean by you are not getting the values from the dropDown List ? Are the values being saved in te Entries ?
Fuji, I mean. I need to read the all items from dropdownlist, not just a user's selected item.
For example. In figure: dropdownlist has items a, b, c, & d. If user selects "c" and submits the form, record.GetRecordField("dropdownlist").ValuesAsString() contains "c". However if you want to put some logic on it, you need all items. For example, let say you want to know the index of the selected item.
Does it make sense?
Comment author was deleted
Yeah record only contains submission, for the form design you'll need the form object :) that will contain all form details including the prevalues for the fields
Thanks Tim.
How to get the Form object by Guid?
E.g. Guid gId = record.Form; //get the form guid
// I would like to get Form object "Form gForm = Form get by gId"
Comment author was deleted
Check FormStorage in Umbraco.Forms.Core.Data
is working on a reply...