Umbraco.Community.SimpleForms
1.0.7
See the version list below for details.
dotnet add package Umbraco.Community.SimpleForms --version 1.0.7
NuGet\Install-Package Umbraco.Community.SimpleForms -Version 1.0.7
<PackageReference Include="Umbraco.Community.SimpleForms" Version="1.0.7" />
<PackageVersion Include="Umbraco.Community.SimpleForms" Version="1.0.7" />
<PackageReference Include="Umbraco.Community.SimpleForms" />
paket add Umbraco.Community.SimpleForms --version 1.0.7
#r "nuget: Umbraco.Community.SimpleForms, 1.0.7"
#:package Umbraco.Community.SimpleForms@1.0.7
#addin nuget:?package=Umbraco.Community.SimpleForms&version=1.0.7
#tool nuget:?package=Umbraco.Community.SimpleForms&version=1.0.7
Simple Contact Form for Umbraco
A basic contact form project that can be added to any site without requiring any back end development at all.
Usage
You can add the package using the following command
dotnet add package Umbraco.Community.SimpleForms
Once the package is installed, you can use insert a form using one of three options
Adding a basic contact form
Add the following sippet into your page if you want to use standard contact form built into the package. This is distributed as a partial view, so you won't be able to edit it directly, but you can still style the form using CSS.
# Add this using statement to the top of your page
@using Umbraco.Community.SimpleForms.Models;
# Add this to the body of your page where you want to render the form
<section class="section section">
@{
await Html.RenderPartialAsync("SimpleFormsContact", new SimpleContactFormViewModel());
}
</section>
Adding a custom contact form
You can also create your own partial view to create a custom contact form layout, and using the SimpleContactFormViewModel to render the form. This is useful if you want to change the layout of the form.
Please Note : you won't be able to add additional fields to this form yet.
Create the custom Partial
Create a new partial view in the Views folder of your site. I called mine "CustomContactForm.cshtml". Add the following code to the partial view. You can customise this layout as you wish.
@using Umbraco.Community.SimpleForms.SurfaceControllers
@using Umbraco.Extensions
@model Umbraco.Community.SimpleForms.Models.SimpleContactFormViewModel
@using (Html.BeginUmbracoForm<SimpleFormsSurfaceController>(nameof(SimpleFormsSurfaceController.Submit)))
{
<div>
@Html.TextBoxFor(m => m.Name, new { @class = "form-control", placeholder = Html.DisplayNameFor(m => m.Name) })
@Html.ValidationMessageFor(m => m.Name)
</div>
<div>
@Html.TextBoxFor(m => m.Email, new { @class = "form-control", placeholder = Html.DisplayNameFor(m => m.Email) })
@Html.ValidationMessageFor(m => m.Email)
</div>
<div>
@Html.TextAreaFor(m => m.Message, new { @class = "form-control", placeholder = Html.DisplayNameFor(m => m.Message) })
@Html.ValidationMessageFor(m => m.Message)
</div>
<input type="submit" name="Submit" value="Submit" />
}
Using the new Custom Form Partial
# Add this using statement to the top of your page
@using Umbraco.Community.SimpleForms.Models;
# Add this to the body of your page where you want to render the form
<section class="section section">
@{
await Html.RenderPartialAsync("SimpleFormsContact", new SimpleContactFormViewModel());
}
</section>
Using a Tag Helper
There is also a taghelper in development, which will allow you to render the form with a single line. This will be made available soon.
Stats
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net6.0
- Microsoft.AspNetCore.Components.Web (>= 6.0.14)
- Umbraco.Cms.Web.BackOffice (>= 10.4.0)
- Umbraco.Cms.Web.Website (>= 10.4.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
1.0.19 | 346 | 6/15/2023 |
1.0.18 | 227 | 6/14/2023 |
1.0.16 | 224 | 5/18/2023 |
1.0.15 | 239 | 5/10/2023 |
1.0.13 | 317 | 3/10/2023 |
1.0.12 | 317 | 3/10/2023 |
1.0.11 | 312 | 3/10/2023 |
1.0.10 | 328 | 3/9/2023 |
1.0.9 | 303 | 3/9/2023 |
1.0.8 | 334 | 3/8/2023 |
1.0.7 | 307 | 3/7/2023 |
1.0.6 | 302 | 3/5/2023 |
1.0.5 | 315 | 3/3/2023 |
1.0.4 | 336 | 3/3/2023 |
1.0.3 | 309 | 3/1/2023 |
1.0.2 | 316 | 3/1/2023 |
1.0.0 | 353 | 3/1/2023 |