Forum Replies Created
-
AuthorPosts
-
Sanchez
ParticipantPlease disregard, I was able to get the following to work:
function dffs_PreSaveAction(){
var startDate = spjs.utility.getDateFieldAsDateObject(‘StartDate’);
var endDate = spjs.utility.getDateFieldAsDateObject(‘EndDate’);
var dateAnswer1 = spjs.utility.getDateFieldAsDateObject(‘DateAnswer1’);if (dateAnswer1 > startDate && dateAnswer1 < endDate) {
return true;
}else {
alert(“Date is not range”);
return false;
}}
Sanchez
ParticipantThank you! I can’t get the button to show up on DispForm.
// Add button
jQuery(“input[id=’_editItemBtn’]”).after(“<input type=’button’ class=’ms-ButtonHeightWidth’ style=’margin-right:4px;’ value=’Copy & Start a New Entry’ onclick=’saveAndCopy()’ />”);
var createCopyWhenSaving = false;
function saveAndCopy(){
createCopyWhenSaving = true;
spjs.dffs.triggerSave();
}also tried changed beginning of line one to jQuery(“input[id=’dffs_editItemBtn’]”).after and also jQuery(“#dffs_editItemBtn”).after but can’t figure it out.
Sanchez
ParticipantHi Alexander, I was able to solve for it using the following:
.dffs-readonly-hidden{
display: block;
}.dffs-readonly-hidden .ms-long, .dffs-readonly-hidden br{
display: none;
}Thanks!!!
Sanchez
ParticipantThank you Alexander. That box did not work for me for some reason. My ‘read-only’ fields also happen to be ‘cascading dropdowns’ so I’m not sure if that is why. I tested the function with a non-casc field and it does appear to work okay with those.
Sanchez
ParticipantHi Alexander, the user manual referenced above does not say how to make field description visible. It only says:
Read-only fields = Select fields to make read only.I was able to display it by first unhiding the entire .dffs-readonly-hidden and only hiding the .ms-long portion of it using the Custom CSS below. Only problem is that there is a <br> line break element that leaves a white space. How can I remove that line break so that the description is displayed immediately below the input fields like it does for non-readonly fields?
.dffs-readonly-hidden {
display: block;
}.dffs-readonly-hidden .ms-long{
display: none;
}Sanchez
ParticipantThat may work just as well. Thank you Alexander!
March 9, 2022 at 18:48 in reply to: Custom JS to set default value for choice yes/no drop down field #35600Sanchez
ParticipantI have been able to solve for it using cascading dropdowns. Tool does allow for multiple columns (Column A and B) to both reference the same original field from the other list.
March 9, 2022 at 17:52 in reply to: Custom JS to set default value for choice yes/no drop down field #35599Sanchez
ParticipantHi Steve, Column A is a text field because it happens to be a cascading dropdown being referenced from another list. But yes there will always be a yes/no value. I was hoping to avoid adding yet another rule since I’m in the upper 90s now and wanting to skim those down as it may be too much to maintain or can impact load time. Was thinking adding Custom JS that gets value from Column A as default for Column B would be better. Do you suggest a rule is better?
Sanchez
ParticipantSteve, when I increase the font in the read-only box, it also increases as a bolder frame. I’ve tried everything I can think of. Any suggestions what else I can do to get it closer to the one on the right?
.spjs_boolean_readonly{
color:#5695a4;
font-size: 1.8em;
}Attachments:
Sanchez
ParticipantThat was my fear, lol. I’ve been playing with it since yesterday but can’t fully figure it out. Thank you.
Sanchez
Participantyes thank you Steve, that is what I had to do temporarily as well. Ü
Sanchez
ParticipantHad to set ‘Set Fields’. It works perfectly! Wow, you never cease to amaze us. Thank you so much Alexander. I’ve shared your most recent update with our organization’s SP community. Everyone is just as excited as me.
Sanchez
ParticipantHi Alexander. I appreciate you prompt response Ü. Unfortunately it didn’t work. I can create the relationship between both fields in cascading dropdown and I can locate the ‘note’ field to add row in Tabs but like before, it breaks all cascading dropdown fields previously working. They simply return all blanks. Tells me to change field to ‘Single Lines of text’ which if I do (and I did) it will return all other cascading fields except for that one. that one still pull blank.
Sanchez
ParticipantYes, that would definitely solve for it. Ü
Sanchez
ParticipantThank you Alex. The list is a change request intake list so the new item form gives pulls in existing details to the item they are wanting to change so they can see the existing data followed by a field near it for them to tell us what they need to change it to. most of the ‘current’ data fields are pulled using Cascading Dropdowns except for these 2 because they are multiline text fields. i.e. the screen shots show a vlookup for ‘Current Definition’ followed by a ‘New Definition’ for their entry. when the form is saved, the list will notified all appropriate people that need to review the change so having the vlookup column display the content next to the ‘new’ helps them see what they are changing from and to. The form is not intended to automatically update the original list source on any way. It’s only a centralized tool for change requests to be reviewed and the submitter can come back to it and check the approval status. Attaching a partial screenshot of the ‘TO’ list. Hope this helps. Ü
-
AuthorPosts