Documentation > CMS Template API Library > InputForm > GetPanels(String,SortOrder)
GetPanels
Get panels based on list name from data posted from the InputForm.
public List<PanelEntry> GetPanels(String,SortOrder)
Returns
The requested list of PanelEntries
Parameters
Name | Description | Type |
---|---|---|
name | Name of the field on which to create the list | System.String |
sort | Optional: sort order, default is null. If null, the list will be in the order it was saved. | CrownPeak.CMSAPI.SortOrder |
Code Example
C#
Sample:
List<PanelEntry> panels = context.InputForm.GetPanels("list_name"); foreach (PanelEntry entry in panels) { Out.WriteLine("The value of list_field in this panel is: " + entry["list_field"]); }