-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
BugC: FormFP: CompletedSync status with associated Feedback ItemSync status with associated Feedback ItemS: Wrappers (ASP.NET Core)SEV: Medium
Milestone
Description
Bug report
The Form TagHelper does not provide support for hidden fields, similar to the HtmlHelper.
Reproduction of the problem
The Form TagHelper does not allow similar built-in configuration:
.Items(i =>
{
i.Add()
.Field(f => f.UserID)
.Editor(editor => editor.Hidden());
})
Expected/desired behavior
The Form TagHelper should support hidden inputs.
Workaround
Similar result can be achieved by setting the editor-handler
attribute, creating a hidden input and setting an empty label:
<form-items>
<form-item field="UserID" editor-handler="hiddenEditor" >
<item-label text=" " />
</form-item>
</form-items>
<script>
function hiddenEditor(container, options) {
$('<input type="hidden" data-bind="value: ' + options.field + '" name="' + options.field + '"/>')
.appendTo(container);
}
</script>
Environment
- Kendo UI version: 2022.3.913
- Browser: [all]
Metadata
Metadata
Assignees
Labels
BugC: FormFP: CompletedSync status with associated Feedback ItemSync status with associated Feedback ItemS: Wrappers (ASP.NET Core)SEV: Medium