Autocomplete not saving new values

Home Forums Autocomplete Autocomplete not saving new values

Viewing 6 reply threads
  • Author
    Posts
    • #13798
      Celeste Garcia
      Participant

        I cannot get Autocomplete to allow saving new values in DFFS NewForm. Clicking on “Add {0} to the address list?” saves a blank value for the AC field. Is there something I’m missing in the configuration? Here’s what is in the Custom JS:

        spjs.ac.text = {
        “imgTitle”:”The list of previously used addresses is updated automatically when you type”,
        “noItems”:”No addresses match your search”,
        “addNewItem”:”Add {0} to the address list?”,
        “noValidItems”:”No valid items match your search”,
        “invalid”:”Invalid value”,
        “moreItemsLabel”:”Showing the first {0} items”,
        “moreItemsMouseover”:”Continue typing to narrow your search”,
        “searching”:”Searching for: ”
        };

        spjs.ac.textField({
        “applyTo”:”InspectionAddress”,
        “helpText”:””,
        “listGuid”:”Inspections”,
        “listBaseUrl”:”/sites/fire/Prevention”,
        “showField”:”InspectionAddress”,
        “enforceUniqueValues”:false, // New in v1.33
        “rowLimit”:15,
        “listOptionsOnFocus”:false,
        “reValidateOnLoad”:false,
        “allowAddNew”:true, // New in v1.4
        “isLookupInSelf”:true, // New in v1.4
        “setFields”:[
        {
        “fromFIN”:”InspectionAddress”,
        “toFIN”:”InspectionAddress”,
        “parseFunction”:””,
        “skipIfEmpty”:true
        }
        ]
        });

        Thank you!

      • #13803
        Alexander Bautz
        Keymaster

          Hi,
          The “setFields” section is used to set additional fields (pull more fields form the lookup list based on the match made in the “showField” and write them to the current item). If the “InspectionAddress” field is the only one you want to populate, leave the “setFields” empty like this:

          "setFields":[]

          I’m not 100% sure this is the issue, so please post back your findings.

          Best regards,
          Alexander

          • #13831
            Celeste Garcia
            Participant

              Still same behavior…it lets me choose the new value, but doesn’t save.

          • #13834
            Alexander Bautz
            Keymaster

              Could you bring up the developer console (hit F12 > Console) and see if there are any errors there when you try to save?

              Also, ensure you don’t have any custom code or DFFS rules overriding the set value on save.

              Could you attach a screenshot of how the field renders in the form?

              Alexander

            • #13848
              Celeste Garcia
              Participant

                No errors, but the following message comes up in the Console:

                DOM7011: The code on this page disabled back and forward caching. For more information, see: http://go.microsoft.com/fwlink/?LinkID=291337
                File: NewForm.aspx

                No custom code or DFFS rules affecting the Address field. Attached are screenshots from before and after clicking “Add {0} to the list?”, and when an invalid string is left in the field…

              • #13858
                Alexander Bautz
                Keymaster

                  Hi,
                  I have found the bug that prevented the values from being saved. I’m embarrassed to say it was a silly mistake in the code – introduced in v1.4.

                  You find the change log and a link to download the changed file here.

                  Just unzip the file and upload and replace the file in your “/SPJS/DFFS/plugins” folder.

                  Sorry for the inconvenience and thank you for the patience.

                  Best regards,
                  Alexander

                • #13862
                  Celeste Garcia
                  Participant

                    It works! Thank you so much for your fast and thorough response!!

                    Cheers,
                    Celeste

                  • #13888
                    Alexander Bautz
                    Keymaster

                      Thanks for the feedback – I’m glad it worked out.

                      Alexander

                  Viewing 6 reply threads
                  • You must be logged in to reply to this topic.