Search Results for 'list form'

Home Forums Search Search Results for 'list form'

Viewing 15 results - 1,186 through 1,200 (of 1,358 total)
  • Author
    Search Results
  • #9661
    Alexander Bautz
    Keymaster

      Hi,
      You can use vLookup to connect the lists, and DFFS to build the form – and then print it to PDF from DispForm (you must have a “PDF-Printer” installed locally).

      Unfortunately I don’t have time to build this for you, but I can help guide you if you give it a try yourself.

      Post question here as you proceed.

      Best regards,
      Alexander

      nils.enhoerning
      Participant

        Hi 🙂

        We have been battling, and almost winning the battle, against the issue that the rule to handle content types on new form for lists with multiple content types is not working so well for us.

        We have the following setup:
        List with 2 content types (subsite and sitecollection), on premise sp2013, Oct 25th Production pacakge of SPJS Dynamic forms. We are using the CEWP method, not the jslink, in case that matters.

        Initially we encountered the message that the field was not present in the content type on some of the fields of the “site collection” content type, as it does not have some of the fields the subsite content type. After a lot of trickery we managed to solve this with a custom JS check:

        function getContentTypeName()
        {
        return WPQ2FormCtx.ItemContentTypeName;
        //replace with content type ID if you want to safeguard against renamed content types
        }

        function getContentTypeSubsite(){
        if(getContentTypeName() == “SubSite”){return true;}else{return false;}
        }

        function getContentTypeSiteCollection(){
        if(getContentTypeName() == “SiteCollection”){return true;}else{return false;}
        }

        Then we used rules invoking these 2 methods to hide or show the unique fields, which worked just fine up until a point:

        If we moved the fields which should be hidden/shown based on the content type to another tab than the one loaded when the form loads (i.e. any tab other than the first tab) then the problems returns.

        Has anyone tried to hack it like this and gotten it to work with tabs? 🙂

        #9517
        Alexander Bautz
        Keymaster

          Hi,
          This should be fixed in the latest versions of spjs-utility: https://files.spjsworks.com/?dir=files%2Fspjs-utility%2Fv1.256%2F

          This is the changes

          spjs-utilty.js v1.256:
          When using vLookup to create a child list item from DispForm of the parent, it was not possilble to bring the value from a multichoice lookup column over to the child list item.

          Can you test to see if this helps?

          Alexander

          #9501
          DCH
          Participant

            Alexander,

            I’d like to be able to sort the vLookup table in the parent list forms by clicking on a column heading. Would that be difficult to implement?

            Thanks!

            #9434

            In reply to: Rule Validation

            Kyle Vaske
            Participant

              It appears that there may be a bug in the DFFS solution. (I will add my code below). What I am seeing is, when the user clicks “Complete & Send”, and it changes the field value to “Completed” and runs the rule validation. If not all required fields are completed, there is an alert stating “Additional Fields are Required”, and then it changes the field back to “In Progress”.
              The user should then be able to continue completing the form and be allowed to either “Save” or “Complete & Send”. If a normal “Save” is clicked, the rule validation should not apply because the field is still marked as “In Progress”. However, the rule is still being applied and requiring all fields that are listed within the rule. How can the rule be reversed after it has been applied?

              I have tried to create an additional rule that explicitly states the fields are Optional, but that still has not worked.

              
              
              (function(){
                  var b = [""];
                  b.push("<td class='ms-toolbar' nowrap='nowrap'>");
                  b.push("<input type='button' class='ms-ButtonHeightWidth' value='Complete & Send' onclick='finalSave();' />");
                  b.push("</td>");
                  b.push("<td class='ms-separator'>&nbsp;</td>");
                  $("input[id$=diidIOSaveItem]:last").parents("table:first").parents("td:first").before(b.join(""));
              })();
              
              function finalSave(){
                  setFieldValue("FinalSave","Completed");
                  var rStat = spjs.dffs.data.ruleIndexObj[1];
                  if (rStat == true){
                      $("input[id$=diidIOSaveItem]:last").click();
                  }else{
                      alert("There Are Additional Fields That Are Required");
                      $('[id$="FinalSave"] span input:checked').click()
                      setFieldValue("FinalSave","In Progress");
                  }
              }
              #9331
              chgrnet
              Participant

                It says if I am using DFFS in the child I don’t have to use the receiver file, but when I go into the vLookup setup for the NewForm.aspx, my field is not listed. Also, when I add the “_” to the fields (EditForm), they don’t show up in vLookup, but when I remove it they do.

                Tony Bowes
                Participant

                  Thankyou!

                  I managed to get the people picker field to successfully filter another list. Initially had it working with the original CAML, but my field is autofilled on the form from another DFFS form, so I changed to the second method.

                  A point to note on the second method, the spjs.lookup.init needs to be changed to your own SPJS-Lookup initialisation, APART FROM the “+ppID+” in the middle of the CAML. I had left mine as the original post’s CAML (the “+String(spjs.dffs.beforeProperties[“Requester_ID”])+” part) and had undone all the extra work put in to make it actively pick up the new people picker field’s value.

                  #9201
                  Bloodlvst
                  Participant

                    Hey again!

                    So we have a few specific articles in one of our lists that require specific formatting for tables when displayed. In doing some testing, I think I may be on the right track, but not quite there.

                    What I’m trying to do is make it so if the item ID is equal to ID’s 26, 30, or 31, that I inject the CSS via jQuery to format the table in those articles the way we wish. Here’s what I’ve managed to come up with, but it still doesn’t work. I’m not very experienced in JavaScript/jQuery so I’m likely missing something.

                    var itemID = "?ID=26";
                    $(function(){
                    if (location.search == itemID){
                    	$(".ms-rteTableHeaderEvenCol-default, .ms-rteTableHeaderOddCol-default").css("color", "#FFF !important");
                    	}
                    });

                    Can anyone help me figure out what I’m missing?

                    Thanks!

                    • This topic was modified 9 years, 6 months ago by Bloodlvst.
                    #9193
                    AdamP
                    Participant

                      Hi Alexander

                      Your logic is correct as usual. The broken display form initially only appeared to happen with the initAttachments function in the special configurations area (repeated several times with/without).

                      I’ve repeated the tests again today and have seen the same broken display of the child list without the initAttachments function being called – primarily when using dialogs but on a couple of occasions with forms displayed as complete pages. I’m not sure why, but the issue seems to be occurring more frequently now.

                      The closest I’ve got to working out what’s going on so far is an anomaly in the child form url – the & characters are replaced with %26 – I think that’s potentially invalidating the item ID and causing the child form to display without any values.

                      Any idea what to try next?

                      #9155
                      Alexander Bautz
                      Keymaster

                        In forms you can use a rule to hide the “newItemWrap_vLookupFIELDINTERNALNAME” – replace FIELDINTERNALNAME with your fields name.

                        In list view you must write some custom code to get the groups for the user to determine whether or not to hide the button. Which version for SharePoint are you using?

                        Alexander

                        AdamP
                        Participant

                          Hi Kyle

                          Can you use a slightly different approach and make use of DFFS to achieve the same end result and avoid jQuery altogether? I’ve used something similar for a wiki and wanted to control what users did with images (no overwrites or editing – effectively provides version control of the images within pages)
                          The upload.aspx form generally isn’t controlled by DFFS…so custom css set ‘there’ won’t have any effect.

                          So…
                          First – You can modify permissions on the library where you’re storing the images so that people can add but not modify items (you may need to create and edit permission levels to achieve this). We have a permission level called “contribute-add only”. I’ve not double checked but I believe that would prevent an overwrite of files with exactly the same name.
                          Second – Use dffs rules on the image library editform.aspx to create a specific and unique filename – eg append the date and their username onto the filename on save. That effectively creates a completely unique file reference that can never be overwritten.

                          Does that make sense? Does anyone else have any improved methods?

                          I’ve had issues with inserting images into rich text fields on lists though – the image file seems to get stored in a folder called either newform or editform…not very user friendly.

                          Adam

                          #9145
                          AdamP
                          Participant

                            Hi Alexander, thanks for the modified code.

                            We’re very close with this, just a couple of issues that have shown up…

                            For clarity,a summary of what I’ve ended up with;

                            CustomJS area of the form (note I’ve edited the image used for the paperclip to a SP2010 path instead of a SP2013 one) ;

                            
                            
                            function initAttachments(a,item){
                            	if(item.get_item("Attachments")){
                            		return "<img style='border:0px;cursor:pointer;' width='16' height='16' alt='Attachments' src='/_layouts/images/attachhd.gif' onclick='getAttachments(\""+item.get_item("ID")+"\");'>";
                            	}else{
                            		return "&nbsp";
                            	}
                            }
                            
                            function getAttachments(id){
                            var url = _spPageContextInfo.webServerRelativeUrl+"/_vti_bin/ListData.svc/Comments("+id+")/Attachments";
                            	$.getJSON(url, 
                            		function(data) {
                            			var b = [];			
                            			spjs.$.each(data.d.results,function(i,o){
                            				b.push("<div><a href='"+o.__metadata.media_src+"' target='_blank'>"+o.Name+"</a></div>");
                            			});
                            			spjs.dffs.dlgBox(b.join(""),true);
                            		}		
                            	)
                            }

                            And in the “Special Configurations” text area for the attachments field on the vLookup config;

                            {"function":"initAttachments"}

                            This works well – when the paperclip is clicked you get a DFFS dialogue with the attachments listed – see screenshot. The only improvement here would be to have a slightly less overbearing overlay, so that the content behind the dialogue is still shown (similar to OOTB sharepoint dialogue boxes).

                            The issue I’ve discovered is that with this code set up – the display of child items via the magnifying glass icon breaks – see second screenshot. It looks like it’s losing the item ID of the child item when the child form loads. Field values are filled with “FieldInternalName + ‘field value’ “.

                            Any idea of the what’s happening here? It’s almost perfect apart from this one glitch.

                            Thanks

                            Adam

                            #9091
                            Alexander Bautz
                            Keymaster

                              If you just want to show them in EditForm you can use something like this to read the values:

                              var res = spjs.utility.getItemByID({"listName":_spPageContextInfo.pageListId,"id":GetUrlKeyValue("ID"),"viewFields":["RelatedItems"]});
                              alert(res.RelatedItems);

                              This will output something like this (two related items):

                              [{"ItemId":31,"WebId":null,"ListId":null},{"ItemId":45,"WebId":"5b315066-48ba-42b1-9ef1-1387b67dcd9b","ListId":"5f82a17a-d27b-4f6d-8c2b-fa201e40b40b"}]

                              This must then be converted into a proper “link”, but if it is internally in one list you can use the “ItemId” directly to create the link using “/Site/List/DispForm.aspx?ID=XYZ”.

                              PS:If the link is internal in the list, the ListId and WebId parameter is null.

                              Alexander

                              AdamP
                              Participant

                                Hi Alexander
                                I’m just trying out setting URL parameters on the newform of a child item and spotted a possible anomaly in that the key and value are repeated. This doesn’t seem to cause any problems at the moment, but I guess it could do.
                                URL of the newform child item is;

                                http://Site/Lists/List/NewForm.aspx?parentListGuid={e3b885c4-749c-4227-ae5e-1298a919603a}&parentForm=/Site/Library/Forms/DispForm.aspx&parentItemId=1&baseUrl=/Site&getFromParent=ID|ParentDocID|false~{Doc}|Library|false&urlParamTest=Testing&urlParamTest=Testing&Source=/Site/Library/Forms/DispForm.aspx?ID=1%26sTab=1&IsDlg=1

                                My key is “urlParamTest” with the value “Testing” (both shown twice in the URL)

                                This is on SP2010, DFFS Frontend 4.358, jQuery 1.11.3, vLookup Frontent 2.253

                                David S Kaimann
                                Participant

                                  Alex,

                                  Is there any way (through Custom JavaScript) to only show the “Add new item” section of vLookup Fields to a specific User Group (or Groups)? I’d like to be able to do this in both ListView and the forms (Edit/Disp/New).

                                  Thanks!

                                Viewing 15 results - 1,186 through 1,200 (of 1,358 total)