Forum Replies Created
-
AuthorPosts
-
Noticed I’m still having issues with this code. The selected options (email distlists) are not being saved to the form before the SPD Workflow kicks, and the workflow auto-cancels due to a coercion failure. Any ideas/suggestions would be greatly appreciated.
var fin = “distlist”;
var arrOfOptions = [“Staff Hires”, “Attorney Hires”];
var b = [];
b.push(“<div id=’customMultichoiceSelector’>”);
jQuery.each(arrOfOptions, function (i, v) {
b.push(“<input id=’customMultichoice_” + i + “‘ type=’checkbox’ value='” + v + “‘><label for=’customMultichoice_” + i + “‘>” + v + “</label>”);
});
b.push(“</div>”);
spjs.dffs.alert({
“title”: “Multichoice Example”,
“msg”: b.join(“”),
“ok”: function () {
var arr = [];
jQuery(“#customMultichoiceSelector”).find(“input:checkbox:checked”).each(function (i, elm) {
arr.push(jQuery(elm).val());
});
setFieldValue(fin, arr);
spjs.dffs.closeDlg();
dlgBoxOkClicked = true;
// Trigger save again
jQspjs(“input[id$=’diidIOSaveItem’]:last”).trigger(“click”);
},
“okBtnLabel”:”Save & Send”,
“cancel”: function () {
// Close dialog
},
“cancelBtnLabel”: “Cancel”,
});The multiselect code you provided above seems to allow the save without any options selected, Any suggestions how to require a selection prior to triggering the save on button click?
Thank you!
Attachment requirement is functional again! Thanks for the quick turn around!
Looks like the problem is bigger than I had thought…even people pickers in new custom lists without DFFS only function as expected about 10% of the time. It’s clearly not DFFS, but Chrome that is causing my problems.
Nope, nothing custom on the field, just an OOTB people picker field. This is an issue in all my forms using this filed type, but only when using Chrome. We are in a recently migrated environment, and I am doing a lot of rebuilding of old InfoPath forms. I’ve just been pointing people to IE until I had some time to deal with it.
Thanks
Attachments:
I’m having trouble setting the focus on form load to a people picker field. I tried the function above (as jQuery(“#dffs_Recipient input:text”).focus();) without success. Any thoughts as to why it is not working?
Thanks in advance.
What is the syntax difference for the display form? Your example is working in the new/edit forms, and I’ve tried several variants for the display form without success. We’re using SP 2016 on-prem.
Thanks.
Yes, I did modify the table format in the js file. The user had wanted the boxes inline to shorten the form length, but we reverted back to vertical.
Thanks!
-
AuthorPosts