I have a bespoke form in 7.5 and it works well in english but it never posts when in a different langauge for example:
testsite.com/myform works in English - notice there is no language path in the URL as en is the default language set in the CMS
but testsite.com/cy-GB/myform does not hit the Controller - it just refreshes the page.
This is my HTML:
@using (Html.BeginForm("Index", "GetInTouchForm", new { language = ContentLanguage.PreferredCulture.Name }, FormMethod.Post))
{
}
and this is my Controller:
public class GetInTouchFormController : PageControllerBase
{
[HttpGet]
public ActionResult Index(GetInTouchForm currentPage)
{
var model = new GetInTouchFormModel(currentPage);
return View(model);
}
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Index(GetInTouchForm currentPage, GetInTouch CustomForm)
{
var model = new GetInTouchFormModel(currentPage) { CustomForm = CustomForm };
}
I have put this in my Global but it didnt resolve the issue:
Hi,
I have a bespoke form in 7.5 and it works well in english but it never posts when in a different langauge for example:
testsite.com/myform works in English - notice there is no language path in the URL as en is the default language set in the CMS
but testsite.com/cy-GB/myform does not hit the Controller - it just refreshes the page.
This is my HTML:
and this is my Controller:
I have put this in my Global but it didnt resolve the issue:
Any ideas?
Thanks for your help,
Jon
[Pasting files is not allowed]