January 15, 2015 at 22:35 #6884
Great work with this solution! It’s been saving me a ton of trouble and I definitely am going to purchase a license in February! 🙂
I’m curious if there’s any way to display a field value for the current item in the tab headers? (This would obviously only be for EditForm and DispForm). We are using DFFS to create a ticket/tracking system to replace our old one, and we’re trying to make it a clone of the old one. I’ve gotten pretty much everything setup with CSS and side-by-side, but this would be the icing on the cake if the ticket number can go into one of our tab headers!
I’ve included a screenshot of the header.
January 16, 2015 at 12:06 #6889Alexander BautzKeymaster
This is no problem. Add this code to the header (see image attached):
PM Number: <span id="putPMNumberHere" />
Then use this code in the custom JS section in the Misc tab:
// For DispForm $("#putPMNumberHere").html(getFieldValue("YourFieldName",true)); // For EditForm $("#putPMNumberHere").html(getFieldValue("YourFieldName",false));
PS: “YourFieldName” is the FieldInternalName – change it for your actual field name.
Hope this helps
- This reply was modified 5 years, 10 months ago by Alexander Bautz. Reason: Fixed error in code example
January 16, 2015 at 14:39 #6891
I’ve tried this, but to no avail. I’m still just getting the same “PM Number:” with nothing there. I’ve attached screenshots of my DispForm config.
Note that I’ve also tried “PM Number” as well instead of the “Title” internal field name, still no luck.
January 16, 2015 at 15:24 #6895Alexander BautzKeymaster
Sorry, my bad – there was an error in the code example. See if this helps.
January 16, 2015 at 15:30 #6896
Ah, good old brackets.
Working like a charm now! Thanks so much! 😀
January 16, 2015 at 17:21 #6898
For anyone who comes across Alex’s solution to this:
I had this header for every tab on my page (essentially, the form showed the PM number on every single tab in the same spot). You may run into trouble with it only showing on the first tab. You can fix this by modifying the code to the following:
PM Number: <span class="putPMNumberHere" />
// For DispForm $(".putPMNumberHere").html(getFieldValue("YourFieldName",true)); // For EditForm $(".putPMNumberHere").html(getFieldValue("YourFieldName",false));
Just use classes instead of ID’s 🙂
- You must be logged in to reply to this topic.