Try our conversational search powered by Generative AI!

Bespoke form not posting when in a different language



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: works in English - notice there is no language path in the URL as en is the default language set in the CMS

but 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
        public ActionResult Index(GetInTouchForm currentPage)
            var model = new GetInTouchFormModel(currentPage);
            return View(model);

        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:

        protected override void RegisterRoutes(RouteCollection routes)
            routes.MapRoute("submit", "{language}/{controller}/{action}", new { action = "Index" });
            routes.MapRoute("default", "{controller}/{action}", new { action = "index" });

Any ideas?

Thanks for your help,


[Pasting files is not allowed]

Jun 22, 2017 12:35

I think we can close this one...

Jun 24, 2017 7:09
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.