I'm trying to build in form hinting for a web application. The form hints are stored in the "Description" attribute of my ViewModel.
public class ViewModel{
[Description("Field description for input hints")]
public string Name {get;set;}
}
I need to be able to pass these through to my form controls "data-content" field.
<input data-content="Field description for input hints" name="Name" class="guidance"/>
I'm unable to just use a simple EditorFor as I can't add additional HTML fields to it.
If I create an editor template, I'd obviously need to access the model metadata. I'm unsure how to do this if I'm passing a null model?