You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allowing CSS classes to be additive was an important need to implement tag helpers.
18
+
19
+
### Workaround
20
+
21
+
If you don't want this behaviour you can override the class using `Attr` instead of `Attrs` for the `class` attribute.
22
+
23
+
24
+
## Removed `Partial` and non-async `PartialFor` from `Form` and `Section` and replaced `this.Form()`, `this.FormSection()` and `this.IsInFormSection()` in partial views and removed `this.PartialModelExpression()` from partial views
25
+
26
+
In order to uplift the partial view capabilities of ChameleonForms and make them easier to use a number of changes have been made:
27
+
28
+
* All non-async methods of invoking partial views have been removed to [prevent possible deadlocks](https://github.com/aspnet/Mvc/issues/7083)
29
+
* Changes have been made as part of introducing tag helpers that means you don't need a special `Partial` method on forms and sections when you are keeping the form model the same; you can now just use the built-in ASP.NET Core partial functionality (i.e. `@Html.PartialAsync` or `<partial>`)
30
+
* The ability to determine whether you are in a Form or Section has been expanded to include detection of whether you are within a Field, NAvigation or Message as well and has been implemented so it works anywhere, not just within a partial view. This facilitates tag helper syntax and also allows you to switch between tag helpers and HTML helper syntax if you want
31
+
*`PartialModelExpression` is no longer needed with the new functionality
32
+
33
+
See [the documentation](https://mrcollective.github.io/ChameleonForms/docs/partials.html) for more information.
34
+
35
+
### Reason
36
+
37
+
Per above.
38
+
39
+
### Workaround
40
+
41
+
* Invoking partial with same model as the parent (use built-in partial functionality)
@await Html.PartialAsync("_PartialWithOtherModel", new OtherModel())
77
+
```
78
+
79
+
* Accessing the current form
80
+
```cs
81
+
Html.IsInChameleonForm()
82
+
Html.GetChameleonForm()
83
+
```
84
+
85
+
* Accessing the current form section
86
+
```cs
87
+
Html.IsInChameleonFormsSection()
88
+
Html.GetChameleonFormsSection()
89
+
```
90
+
91
+
92
+
# Version 4.0.0-beta0001
6
93
7
94
## .NET Framework no longer supported
8
95
@@ -14,7 +101,7 @@ ChameleonForms has been upgraded to support ASP.NET Core MVC. It's much easier t
14
101
15
102
### Workaround
16
103
17
-
If you want to support .NET Full Framework with MVC 5 then check out v3.0.3 of the [NuGet package](https://www.nuget.org/packages/ChameleonForms/3.0.3) and [documentation](https://chameleonforms.readthedocs.io/en/3.0.3/). If you want to use a different version of .NET Core then [raise an issue](https://github.com/MRCollective/ChameleonForms/issues) to discuss adding that support.
104
+
If you want to support .NET Full Framework with MVC 5 then check out v3.0.3 of the [NuGet package](https://www.nuget.org/packages/ChameleonForms/3.0.3) and [documentation](hhttps://chameleonforms.readthedocs.io/). If you want to use a different version of .NET Core then [raise an issue](https://github.com/MRCollective/ChameleonForms/issues) to discuss adding that support.
Copy file name to clipboardexpand all lines: ChameleonForms/ServiceCollectionExtensions.cs
-2
Original file line number
Diff line number
Diff line change
@@ -14,8 +14,6 @@
14
14
namespaceChameleonForms
15
15
{
16
16
// todo: 4.0 non-beta release
17
-
// Doco: antiforgery, HtmlAttrs Dictionary<string, string>, TagHelpers for everything, partials - new syntax, can use them natively, need special one when changing model, Html.GetChameleonFormsSection etc. extensions
18
-
// Breaking changes: Removed non-async partial and non `For` partial - can just use partials directly, removed WebViewPage.Form / .FormSection / .IsInFormSection / .PartialModelExpression, merge attributes now adds class
19
17
// Build-in DI support e.g. fieldgeneratorrouter
20
18
// Review the datetime "g" and current culture things - remove? client side validation for non / separators?
Copy file name to clipboardexpand all lines: README.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ It's ideally suited for situations where you want to **quickly** build forms tha
31
31
32
32
### Prerequisites
33
33
34
-
This library works against netcoreapp3.1. If you are using a different version of .NET Core or are running ASP.NET Core against Full Framework then feel free to [raise an issue](https://github.com/MRCollective/ChameleonForms/issues) to discuss opening up broader support. If you are using ASP.NET MVC 5 then check out v3.0.3 of the [NuGet package](https://www.nuget.org/packages/ChameleonForms/3.0.3) and [documentation](https://chameleonforms.readthedocs.io/en/3.0.3/).
34
+
This library works against netcoreapp3.1. If you are using a different version of .NET Core or are running ASP.NET Core against Full Framework then feel free to [raise an issue](https://github.com/MRCollective/ChameleonForms/issues) to discuss opening up broader support. If you are using ASP.NET MVC 5 then check out v3.0.3 of the [NuGet package](https://www.nuget.org/packages/ChameleonForms/3.0.3) and [documentation](https://chameleonforms.readthedocs.io/).
35
35
36
36
This library works against ASP.NET Core MVC - if you want to use it for Blazor or Razor Pages then feel free to [raise an issue](https://github.com/MRCollective/ChameleonForms/issues) to discuss.
Copy file name to clipboardexpand all lines: docs/the-form.md
+2-1
Original file line number
Diff line number
Diff line change
@@ -93,7 +93,7 @@ The `BeginChameleonForm` extension method looks like this:
93
93
94
94
***
95
95
96
-
By default a self-submitting form, against the page model type, that performs a HTTP post with the browser's default `enctype` (usually `application/x-www-form-urlencoded`) is outputted, but you can change the submit location, HTTP verb, `enctype` and add any [HTML attributes you like](html-attributes.md) using the appropriate parameters, e.g.:
96
+
By default a self-submitting form, against the page model type, that performs a HTTP post with the browser's default `enctype` (usually `application/x-www-form-urlencoded`) is outputted, but you can change the submit location, HTTP verb, `enctype`, presence of anti forgery token and add any [HTML attributes you like](html-attributes.md) using the appropriate parameters, e.g.:
97
97
98
98
# [Tag Helpers variant](#tab/configure-form-th)
99
99
@@ -162,6 +162,7 @@ If you want to override this behaviour you can configure your own form template.
0 commit comments