Home › Forums › Classic DFFS › Multiline Textfield Read-only
- This topic has 5 replies, 3 voices, and was last updated 4 years, 9 months ago by Alexander Bautz.
-
AuthorPosts
-
-
March 27, 2015 at 12:51 #7325
Hi Alex
The new version is really great, congrats! 🙂
Unfortunately there is something strange when I try to make a multiline texfield (append mode) ready-only. It doesn’t show up the already written text. It just show the grey dashed field without the entries. Is there a way to show them either when it is not allowed to add new entries?Thanks
Corina -
March 27, 2015 at 16:01 #7327
Hi,
This is currently not added to DFFS, but I have had other requests. This is a workaround you can use.Add a function like this to the “Custom JS”
function appendHistory(){ var history = $("#dffs_Textarea1").find("td.ms-formbody div.dffs_tdWrap div").has("a").html(); $("#dffs_Textarea1").find("td.dffs-readonly-inner div.dffs_tdWrap").append("<div style='margin:2px;padding:3px;border:2px silver dashed;background-color:#ffffff;'>"+history+"</div>"); }
You must change “Textarea1” to your own FieldInternalName.
Then add a call to this function on the rule that sets the field read only (in the “Run these functions” field).
Let me know how this works out.
Alexander
-
May 21, 2015 at 10:15 #7682
This fix works for me, thank you very much! 🙂
-
May 22, 2017 at 18:51 #16638
I’m trying to implement this and it comes back as “undefined” what might I have missed here. We had issues with the field internal name because it had underscores that were converted to the code, before changing them we got a syntax error due to the field internal name, after changing it to underscores it just comes back as undefined.
Here is the function:
function appendHistory(){
var history = $(“#dffs_Worklog_x0020_History”).find(“td.ms-formbody div.dffs_tdWrap div”).has(“a”).html();
$(“#dffs_Worklog_x0020_History”).find(“td.dffs-readonly-inner div.dffs_tdWrap”).append(“”+history+””);
}and here is the field internal name the way it appears: Worklog%5Fx0020%5FHistory
again with the original field internal name we get a syntax error, and with the modified name we get “undefined”
-
June 2, 2017 at 17:54 #16747
Hi,
Sorry for the late reply. You can see the fieldinternalname in the “List fields” tab in DFFS backend. Ensure you have the correct field name.Alexander
-
March 11, 2020 at 21:23 #29091
I’m bumping this old question with an updated solution for later versions of DFFS.
Add this to your Custom JS:
function appendHistory() { var fin = "YOUR_FIELD_NAME"; jQuery("#dffs_" + fin).find(".append_history_placeholder").remove(); var history = $("#dffs_" + fin).find("span[dir='none']").next().html(); jQuery("#dffs_" + fin).find(".dffs-readonly-inner").append("<div class='append_history_placeholder'>"+history+"</div>"); }
Replace YOUR_FIELD_NAME with the internal name of your multiline append field.
Then, in the rule you use to set the field readonly, call the function appendHistory in the Run these functions / evaluate these rules field.
Alexander
-
-
AuthorPosts
- You must be logged in to reply to this topic.