+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Query form description of form using current culture

Query form description of form using current culture

1 posts, 0 answered
  1. Anju
    Anju avatar
    19 posts
    Registered:
    22 Jul 2014
    28 Sep
    Link to this post

    Hi,

    I have created a mvc form in two languages in Sitefinity backend (Sitefinity 9.1). Now i need to create a mvc custom widget in visual studio. I want to display the form description based on the current culture in the front end. 

     var currentCulture = Thread.CurrentThread.CurrentUICulture.Name;
     var formManager = FormsManager.GetManager();
     return formManager.GetForms().Where(f => f.Name == FormName &&  f.AvailableCultures.Contains(new CultureInfo(currentCulture))).SingleOrDefault();

    But its throwing error saying parameter not found.

    Please help.

     

     

     

1 posts, 0 answered