I added a form based off a model in a macro partial view. It renders and fires fine but the values are all null in the surfacecontroller. Why is this? The code is copied from a partial view and the error only occurs while used in a macro. I'm in 7.1.8.
@inherits Umbraco.Web.Macros.PartialViewMacroPage
@{
var nl = new NewsletterModel();
}
@using (Ajax.BeginForm("NewsletterSignup", "Newsletter", new AjaxOptions
{
...
}))
{
@Html.AntiForgeryToken()
@Html.LabelFor(model => nl.Email)
@Html.TextBoxFor(model => nl.Email)
<input type="submit" />
}
It works fine if I add the form via a partial view inside the macro. Is this a limitation to the macro views or have I just made something wrong in the markup?
Macro form sends null values
I added a form based off a model in a macro partial view. It renders and fires fine but the values are all null in the surfacecontroller. Why is this? The code is copied from a partial view and the error only occurs while used in a macro. I'm in 7.1.8.
It works fine if I add the form via a partial view inside the macro. Is this a limitation to the macro views or have I just made something wrong in the markup?
is working on a reply...