Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jonas 123 posts 206 karma points
    Aug 21, 2014 @ 09:49
    Jonas
    0

    Custom view files and International Characters

    I have a checkbox that I want to style by renaming the FieldType.CheckBox.cshtml to correct name. The name in admin is "Använd leveransadressen" it contains Swedish characters. I have tried naming it to:

    Anvandleveransadressen.cshtml Användleveransadressen.cshtml Använd leveransadressen.cshtml anvandleveransadressen.cshtml

    But none of the above works.

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Aug 26, 2014 @ 09:21
    Tim Geyssens
    0

    This is the code used to fetch the field view

         public static string GetFieldView(Guid formId, string viewName, string fieldName)
            {
                if (fieldName.Length > 75)
                    fieldName = fieldName.Substring(0, 75);
     
                viewName = FolderName(viewName);
                if (System.IO.File.Exists(HttpContext.Current.Server.MapPath(string.Format("{0}/Forms/{1}/{2}.cshtml", Config.ViewsPath, formId, FolderName(fieldName)))))
                    return string.Format("{0}/Forms/{1}/{2}.cshtml", Config.ViewsPath, formId, FolderName(fieldName));
                if (System.IO.File.Exists(HttpContext.Current.Server.MapPath(string.Format("{0}/Forms/{1}/Fieldtype.{2}.cshtml", Config.ViewsPath, formId, viewName))))
                    return string.Format("{0}/Forms/{1}/Fieldtype.{2}.cshtml", Config.ViewsPath, formId, viewName);
                return string.Format("{0}/Fieldtype.{1}.cshtml", Config.ViewsPath, viewName);
            }

     

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Aug 26, 2014 @ 09:23
    Tim Geyssens
    0

    Ow and it performs this on the name  Regex.Replace(retval, @"\W*", "").ToLower();

    So if you do that on your caption and see what it returns that should be the value you need

  • Jonas 123 posts 206 karma points
    Sep 05, 2014 @ 11:41
    Jonas
    0

    Hi, this gives me anvndleveransadressen.cshtml

    And that does not work either.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies