Home › Forums › Classic DFFS › DispForm.aspx Field Names
- This topic has 3 replies, 3 voices, and was last updated 6 years, 8 months ago by Adam Maxam.
-
AuthorPosts
-
-
September 23, 2014 at 21:32 #6251
Hi.
I have been struggling with this one.I have renaming the Display Fields in the new and edit forms using
$(“nobr:contains(‘Title’)”).html(‘<b>Study Name</b>’);
$(“nobr:contains(‘PTNO’)”).html(‘<b>Patient #</b>’);
$(“nobr:contains(‘SITENO’)”).html(‘<b>Site #</b>’);But in the DispForm I can’t get it. I did find this but it only works for title. If I change the variable to the field I need I get an error with custom JS.
$(spjs.dffs.fields[“Title”]).find(“td.ms-formlabel h3”)[0].childNodes[1].nodeValue = “New label”;What is the new/edit forms equivilant for $(“nobr:contains(‘FIELDNAME’)”).html(‘<b>New Name</b>’);
?Small portion of code I am attempt to change display name
<td fielddispname="PTNO" fieldtype="SPFieldText" class="sbs_Field" fin="PTNO" id="sbs_Field_PTNO" valign="top" style="white-space:nowrap;"><table class="sbs_FieldTable" id="sbs_FieldTable_PTNO" cellpadding="0" cellspacing="0"><tbody><tr id="dffs_PTNO" fielddispname="PTNO" fieldtype="SPFieldText"> <td nowrap="true" valign="top" width="113px" class="ms-formlabel" style="width: auto; border-top-style: none;"><div class="dffs_tdWrap"><h3 class="ms-standardheader">PTNO</h3></div></td> <td valign="top" class="ms-formbody" width="350px" id="SPFieldText"><div class="dffs_tdWrap"> <!-- FieldName="PTNO" FieldInternalName="PTNO" FieldType="SPFieldText" --> 999999 </div></td> </tr></tbody></table></td>
Thank you.
- This topic was modified 10 years, 1 month ago by Sonoma.
-
September 23, 2014 at 22:17 #6253
Hi,
Use this in the Custom JS section in the Misc tab:$(spjs.dffs.fields["CaseStatus"]).find("h3").html("New status label");
“CaseStatus” is the FieldInternalName of the field you want to change. Look at the bottom of the Misc tab for a reference table to find the proper FieldInternalName.
Alexander
-
February 28, 2018 at 19:18 #20023
Hi Alexander,
I tried using this in an Edit form with a fairly recent DFFS version to no avail. Would this still be the correct code to be entered in Custom JS? Does it need to be a part of a function?
$(spjs.dffs.fields[“Negotiation_x0020_Prep”]).find(“h3”).html(“Test Field Rename”);
My version:
Dynamic Forms for SharePoint DFFS Backend v4.4.3.14|CSS version: 4.37 / 4.37|spjs-utility version: 1.309Adam
-
-
September 24, 2014 at 14:11 #6256
This works great on most everything. I do have a few stubborn fields but will eventually figure it out.
I had to recreate a few.Now to attempt to get my borders lined up again. I am test in 3 browsers (IE9/10, FF and Chrome). My table borders are lined up on one but not the others or vice versa. Horizontal is good but verticals are shifted either right or left depending on the border. May give up and use
<HR>
🙂
Thank you so much.
-
-
AuthorPosts
- You must be logged in to reply to this topic.