Home › Forums › General discussion › Fields Read-only alignment issue
- This topic has 7 replies, 3 voices, and was last updated 5 years, 5 months ago by Alexander Bautz.
-
AuthorPosts
-
-
June 21, 2019 at 09:30 #25841
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
-
June 24, 2019 at 13:18 #25868
Hi Alexander,
can you have a feedback for me ?
Best regards
-
June 25, 2019 at 18:23 #25876
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
-
July 2, 2019 at 10:24 #25931
Thank you Alexander, it works fine.
Best regards
-
July 8, 2019 at 16:29 #25966
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.Attachments:
-
July 10, 2019 at 08:51 #25999
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
-
July 15, 2019 at 17:52 #26065
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:
-
July 17, 2019 at 15:28 #26084
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
-
-
AuthorPosts
- You must be logged in to reply to this topic.