Fields Read-only alignment issue

Home Forums General discussion Fields Read-only alignment issue

Viewing 7 reply threads
  • Author
    Posts
    • #25841
      First Eagle
      Participant

        Hi Alexander,

        thanks in advance for your usual strong support.
        Please, i’ve an issue with alignment fields set Read-Only. When setting fields read-only (NewForm, DispForm and EditForm) it generate a big blanc space betwen fields. please how can i manage to fix it ?

        Q2. I want to fields border to be visible and highlighted with a specific color when fields are set read-only. how can i do that ?

        Best regards

      • #25868
        First Eagle
        Participant

          Hi Alexander,

          can you have a feedback for me ?

          Best regards

        • #25876
          Alexander Bautz
          Keymaster

            Sorry for the late reply.
            What happens when you set a field as readonly is that the text value is pulled from the field, then the original input is hidden and the text is shown in its place. I’m not sure what you mean by big blanc space – can you show me a screenshot?

            If you are setting a lot of single line of text fields as readonly, you can add this to your Custom CSS to add a border around them:

            tr[fieldtype="SPFieldText"] .dffs-readonly-inner div{
                border:1px orange solid;
                color:#c5c5c5;
                padding:3px!important;
                width:393px;
            }

            Change the border and color to fit your need.

            Let me know how this work out.

            Alexander

          • #25931
            First Eagle
            Participant

              Thank you Alexander, it works fine.

              Best regards

            • #25966
              Silvestre Kassoka
              Participant

                Hi Alexander,

                I am trying to configure the Side by Side formatting on New form.I have been trying to follow the instruction on the link below without success.

                https://spjsblog.com/dffs/dffs-styling/.

                1. I want to assign formatting to my SBS sides which was lost after i activated the SBS settings.The link above mentions inserting this code in custom JS and Custom CSS
                .sbs_FieldTable *{
                width:auto !important;
                }
                /* Ensure the tooltip icon won’t collapse */
                .customTooltipIcon{
                width:18px!important;
                }

                However when i do so , i get the following erros in both CSS and Custom JS.
                AT this stage i have my SBS columns with no formatting.

                2.
                I have a filled with multiple options i would like to display on the form.In the link there is this snippet
                function showChoicesOnSeparateLines(fin){
                jQuery(“#dffs_”+fin+” td.ms-formbody”).html(getFieldValue(fin).split(“; “).join(“<br>”));
                }

                showChoicesOnSeparateLines(“categoria”);
                However when saving the code it generates erros as shown in attached print screen 4.

              • #25999
                Alexander Bautz
                Keymaster

                  Ah, In a previous version of DFFS the Custom CSS and JS was in the same tab, but now I see that the instructions have confused you. Only insert the CSS in the Custom CSS tab. I fixed the instructions in the article to avoid the confusion.

                  Regarding the problem with the getFieldValue(fin).split function:
                  The reason for this error is that this snippet only works in DispForm – when you run getFieldValue(fin); on a multichoice field in NewForm or EditForm it returns an array and you cannot split it when it is already an array. Change it like this in NewForm and EditForm:

                  function showChoicesOnSeparateLines(fin){
                  	jQuery("#dffs_"+fin+" td.ms-formbody").html(getFieldValue(fin).join("<br>"));
                  }

                  Alexander

                • #26065
                  Silvestre Kassoka
                  Participant

                    Hi Alexander ,

                    I copied the code however the multichoice options are not being formatted.Maybe
                    I am lacking fundamental undestanding.Basically i would like to arrange them in two
                    rolls.
                    e.g XXXXXX XXXXXXX XXXXX XXXXX XXXXX
                    XXXXXX XXXXXXX XXXXX XXXXX XXXXX.

                    Attachments:
                  • #26084
                    Alexander Bautz
                    Keymaster

                      The code snippet in my previous comment joins the items by a line feed (“<br>”) – replace <br> with for example “, ” to show the items comma separated string that breaks normally into two or more lines when there are multiple values.

                      Alexander

                  Viewing 7 reply threads
                  • You must be logged in to reply to this topic.