When I add input for Id as said here https://docs.telerik.com/aspnet-core/html-helpers/layout/form/hidden-fields
i.Add().Field(f => f.Id).Editor(e => e.Hidden());
I got this text on my
Id:
hidden
How to get rid of it?
Also, I don't see input in the DOM tree, how Id will be transferred to the server?
1 Answer, 1 is accepted
2
Accepted
Mihaela
Telerik team
answered on 11 Aug 2023, 06:08 PM
Hello,
I have tested the Hidden() option, and it appears that the overall input is hidden as expected at my end. For your convenience, I am sharing a REPL sample:
Would you please share the Form configuration at your end and any related CSS styles?
Generally, when a specified Form item is hidden, its wrapper (<div> element with class "k-form-field") receives a class "k-hidden" and the input itself is not removed from the DOM tree:
Regarding the form submission, the hidden fields are submitted to the server along with the visible fields.
Regards,
Mihaela
Progress Telerik
Stay tuned by visiting our public roadmap and feedback portalpages. If you're new to the Telerik family, be sure to check out our getting started resources, as well as the only REPL playground for creating, saving, running, and sharing server-side code.