Home › Forums › Comment box for SharePoint › CommentBox Basics
- This topic has 5 replies, 2 voices, and was last updated 1 year, 2 months ago by Saikia Kashmiri.
-
AuthorPosts
-
-
September 12, 2023 at 18:58 #37107
Hey Alex!
Took a long break!
I was trying to work out CommentBox per your reply here (https://spjsblog.com/forums/topic/chevron-above-tabs-showing-status/#post-37099).So some basic questions – Prior to following the instructions you provided and the ones in this link (https://spjsblog.com/commentbox-for-sharepoint/installation-manual-v3/#Updating_from_an_older_version”), do I need to purchase a license for CommentBox separately? I’ve only purchased DFFS license so far (Dynamic Forms for SharePoint v4.4.5.34 – October 15, 2021||spjs-utility version: 1.354|Loader version: v1).
Also do I need to add specific columns to the parent list (like we do in vLookup) to start using this feature?
Lastly, after following the steps in your response, I am getting the error “TypeError:Cannot set properties of undefined (setting ‘licenseCode’)” .. basically it’s not recognizing spjs.cBox …
Thank you!
-
September 12, 2023 at 19:45 #37108
Hi,
Yes, it requires a separate license: https://spjsblog.com/commentbox-for-sharepoint/#Buy_a_licenseThere is a built in trial period, and you can get an extended trial if you need that.
You do not need to add any columns to the parent list item, but you must add the placeholder for the comments (in line 2 of spjs-cBox_CEWP.html) to a HTML section in your form.
It has been some time since I tried cBox in DFFS, but if you have added all the scripts (DO NOT ADD JQUERY – it is already loaded) in the top of the spjs-cBox_CEWP.html file in the textarea at the top of your custom js tab and ensured that all paths to the files are correct and you still get this error, you can try wrapping the function call and the license code setting in line 16 inside a function named dffs_ready – like this:
function dffs_ready(){ /* Add license code here */ spjs.cBox.licenseCode = ""; /* Configuration object */ var cBoxArg = { .... // the rest of the argument object here .... } }
Please remember to add the cBox css file link to the top of the custom css tab.
Alexander
-
September 14, 2023 at 14:34 #37113
Oh scrap .. I missed hitting “Notify me on responses” and thought I never got a response. Alright – I’ll work with our SPUG group about purchase process of commentbox license. Thank you!
-
September 27, 2023 at 21:49 #37154
Hey Alex – A few questions –
1. I have embedded the CommentBox in a tab of my DFFS Form – When someone hits the level 0 subscription bell (to be notified for ALL comments on that tab) – it works fine – but when they hit unsubscribe on the same level, the entire DFFS form reverts to a non DFFS look. How do I avoid that from happening?
2. Can you help me with how I can manipulate the “headerRowTemplateOverride”, “footerRowTemplateOverride”, “subscriptionEmail -> Subject” etc to use a field from the current DFFS form in which the CommentBox is embedded?
3. How do I use html in the above fields to format the size of the texts – currently the header looks very large.
Thank You!
Kash -
September 28, 2023 at 16:58 #37162
1: There is a bug in the code that strips away the ID from the URL. To fix it you can add this to your custom js:
spjs.cBox.doneUnsubscribe = function (iID, id) { delete spjs.cBox.data.mySubscriptions[iID][id]; if (id !== "0") { jQuery("#subscriptionLink_" + iID + "_" + id).removeClass("cBox-Icon-RingerRemove").addClass("cBox-Icon-Ringer"); } else { jQuery("#subscriptionLink_" + iID).removeClass("cBox-Icon-RingerRemoveLarge").addClass("cBox-Icon-RingerLarge"); } spjs.cBox.msgBox({ "title": spjs.cBox.data.dlgHeader, "msg": spjs.cBox.i18n("unsubscribeText"), "ok": function () { if (location.search.match(/\?Unsubscribe|\&Unsubscribe/) !== null) { location.href = location.href.split(/\?Unsubscribe|\&Unsubscribe/)[0]; } else { spjs.cBox.closeDlg(); } } }); }
2: The header and footer row are the ones shown in the attachment (1 is headerRowTemplateOverride and 2 is footerRowTemplateOverride) – do you want to add data from the form here?
Adding the Title to the subject is done like this – use same format for other fields:
"subject": "New comment by {author} on item with Title: " + getFieldValue("Title")
3: You must show me with an image what you want to change. All style applied to the solution can be found in the css file spjs-cBox.css that you link to in the custom css tab – you can edit it to change the styles.
Alexander
Attachments:
-
September 29, 2023 at 14:08 #37166
Thank you! Working on these now.
-
-
AuthorPosts
- You must be logged in to reply to this topic.