Imagine being paid to improve your favorite CMS!

It could be you! Umbraco HQ are hiring and are looking for both talents and senior developers. Wonderful workplace, friendly colleagues and competitive salary.

Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Simon Dingley 1201 posts 2718 karma points
    Jun 08, 2017 @ 11:40
    Simon Dingley

    Hidden Div with Text Field in Default Razor View for Forms

    I am working on some fixes to help a customer become WCAG 2.0 compliant on their government site and found that by default all forms seem to include the following code:

    <div style="display: none">
        <input type="text" name="@Model.FormId.ToString().Replace("-", "")" />

    Firstly, why is this a text field in a hidden div and not a hidden field? Secondly, what is it's purpose given that forms already have the following?

    <input type="hidden" name="FormId" value="@Model.FormId" />

    I can fix the compliance issue easy enough but want to understand the implementation so I can assess the impact of the options for addressing it.

    Thanks, Simon

Please Sign in or register to post replies

Write your reply to: