Documentation > CMS Template API Library > PanelEntry > GetFieldName(String)
GetFieldName
Returns the full field name of a field in the list panel, accounting for proper index.
public System.String GetFieldName(String)
Returns
The full field name
Parameters
Name | Description | Type |
---|---|---|
key | The base field name | System.String |
Code Example
C#
Sample:
foreach (var panel in context.InputForm.GetPanels("list_counter")) { if (string.IsNullOrWhiteSpace(panel["list_item"])) { context.ValidationErrorFields.Add(panel.GetFieldName("list_item"), "List item is a required field."); } }