If I am using templates for all my FieldItems, does each FieldItem need to have the Field attribute to associate the fielditem with the corresponding field in the data model?
See the sample markup below.
Thanks
<
TelerikForm
EditContext
=
"@EditContext"
Columns
=
"2"
ColumnSpacing
=
"20px"
Orientation
=
"FormOrientation.Vertical"
OnValidSubmit
=
"OnValidSubmit"
>
<
FormValidation
>
<
FluentValidationValidator
/>
</
FormValidation
>
<
FormItems
>
<
FormGroup
LabelText
=
"Set options"
>
<
FormItem
>
<
Template
>
<
label
class
=
"k-label k-form-label"
for
=
"setName"
>Set Name</
label
>
<
TelerikTextBox
Id
=
"setName"
@
bind-Value
=
"@model.SetName"
></
TelerikTextBox
>
</
Template
>
</
FormItem
>
<
FormItem
>
<
Template
>
<
TelerikDateRangePicker
@
bind-StartValue
=
"@model.StartDate"
@
bind-EndValue
=
"@model.EndDate"
Min
=
"@ViewModel.MinStartDate"
StartId
=
"startDate"
EndId
=
"endDate"
DisabledDates
=
"@ViewModel.DisabledDates"
>
</
TelerikDateRangePicker
>
</
Template
>
</
FormItem
>
<
FormGroup
Columns
=
"2"
>
<
FormItem
>
<
Template
>
<
label
class
=
"k-label k-form-label"
for
=
"allowAutoFill"
>Allow Auto Fill</
label
>
<
TelerikCheckBox
Id
=
"allowAutoFill"
@
bind-Value
=
"@model.AllowAutoFill"
></
TelerikCheckBox
>
</
Template
>
</
FormItem
>
<
FormItem
Field
=
"@nameof(model.RequiredRecsToExpire)"
>
<
Template
>
<
label
class
=
"k-label k-form-label"
>Required Recs to Expire</
label
>
<
TelerikSlider
@
bind-Value
=
"@model.RequiredRecsToExpire"
Min
=
"0"
Max
=
"20"
SmallStep
=
"1"
LargeStep
=
"5"
ShowButtons
=
"false"
/>
</
Template
>
</
FormItem
>
</
FormGroup
>
</
FormGroup
>
<
FormGroup
LabelText
=
"Initial starting point"
>
<
FormItem
LabelText
=
"existingSets"
>
<
Template
>
<
label
class
=
"k-label k-form-label"
for
=
"existingSets"
>From existing recommendation sets</
label
>
<
RecSetSelector
AvailableSets
=
"@ViewModel.AvailableSets"
IsNew
=
"true"
SelectedSetId
=
"@ViewModel.SelectedSetId"
OnSetSelected
=
"@OnSetSelected"
/>
</
Template
>
</
FormItem
>
<
FormItem
>
<
Template
>
<
label
class
=
"k-label k-form-label"
for
=
"eanList"
>From a list of EANs</
label
>
<
TelerikTextArea
Id
=
"eanList"
@
bind-Value
=
"@ViewModel.EanList"
AutoSize
=
"true"
>
</
TelerikTextArea
>
</
Template
>
</
FormItem
>
</
FormGroup
>
<
FormItem
ColSpan
=
"2"
>
<
Template
>
@*<
br
/>*@
<
label
class
=
"k-label k-form-label"
for
=
"comment"
>Comments</
label
>
<
TelerikTextArea
Id
=
"comment"
@
bind-Value
=
"@model.Comment"
AutoSize
=
"true"
>
</
TelerikTextArea
>
</
Template
>
</
FormItem
>
<
ValidationSummary
/>
</
FormItems
>
<
FormButtons
>
<
TelerikButton
ButtonType
=
"ButtonType.Button"
OnClick
=
"OnCancel"
>Cancel</
TelerikButton
>
<
TelerikButton
ButtonType
=
"ButtonType.Submit"
Primary
=
"true"
>Save</
TelerikButton
>
</
FormButtons
>
</
TelerikForm
>