Skip to content

Conversation

@MMasey
Copy link

@MMasey MMasey commented Mar 14, 2023

Hey @CarlSargunar

Here's that little accessibility related PR for you that I mentioned at Spark. I could only update the form partial example in this repo, but the same kind of thing would likely apply to the actual plugin repo.

image

When going through this I noticed you could also potentially include an example using the in built form tag templates too. e.g.

@* I'm not sure if Umbraco has a built in tag helper for the equivalent for "BeginUmbracoForm" *@
<form asp-controller="SimpleFormsSurface" asp-action="Submit" method="post">
    <div class="mb-3">
        <label asp-for="Name" class="form-label"></label>
        <input asp-for="Name" class="form-control" placeholder="@Html.DisplayNameFor(m => m.Name)" />
        <span asp-validation-for="Name" class="text-danger"></span>
    </div>
    <div class="mb-3">
        <label asp-for="Email" class="form-label"></label>
        <input asp-for="Email" class="form-control" placeholder="@Html.DisplayNameFor(m => m.Email)" />
        <span asp-validation-for="Email" class="text-danger"></span>
    </div>
    <div class="mb-3">
        <label asp-for="Message" class="form-label"></label>
        <textarea asp-for="Message" class="form-control" placeholder="@Html.DisplayNameFor(m => m.Message)"></textarea>
        <span asp-validation-for="Message" class="text-danger"></span>
    </div>
    <button type="submit" class="btn btn-primary">Submit</button>
</form>

@CarlSargunar
Copy link
Owner

Wonderful stuff - thanks Mike, really appreciate it, and I plan on doing more on this in the next couple of weeks myself after I've recovered.

I plan to add and talk about it a lot more in the run - up to codegarden too, really looking forward to it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants