Search the Community
Showing results for tags 'create date specific new record links'.
-
Hi Is there a way to make a "Create Date-Specific New Record Links in Calendar DataPages" if we use the wordpress deploy methode. I tried this code below but it only works in the preview. <script> var month = ""; var allSpanTags = document.getElementsByTagName("span"); for (i=0; i<allSpanTags.length; i++) { if (allSpanTags[i].className == "cbResultSetCalendarCaption"){ month = allSpanTags[i].innerHTML; } } month = month.replace(/January /gi,"1/Day/"); month = month.replace(/February /gi,"2/Day/"); month = month.replace(/March /gi,"3/Day/"); month = month.replace(/April /gi,"4/Day/"); month = month.replace(/May /gi,"5/Day/"); month = month.replace(/June /gi,"6/Day/"); month = month.replace(/July /gi,"7/Day/"); month = month.replace(/augustus /gi,"8/Day/"); month = month.replace(/September /gi,"9/Day/"); month = month.replace(/October /gi,"10/Day/"); month = month.replace(/November /gi,"11/Day/"); month = month.replace(/December /gi,"12/Day/"); var allHTMLTags = new Array(); //Create Array of All HTML Tags var allHTMLTags = document.getElementsByTagName("div"); //Loop through all tags using a for loop for (i=0; i<allHTMLTags.length; i++) { //Get all tags with the specified class name. if (allHTMLTags[i].className == "cbResultSetCalendarField") { var transfer = month.replace(/Day/gi,allHTMLTags[i].innerHTML); /*Begin Add New Link Section*/ allHTMLTags[i].innerHTML = allHTMLTags[i].innerHTML +'<br><a style="text-decoration:none;" href="https://horseplanner.nl/app/apl140/?datum='+transfer+'">Add New</a>'; /*End of Add New Link Section*/ } } </script>