Home › Forums › Autocomplete › Multi Autocomplete clears ApplyTo field data when result of search is empty
- This topic has 5 replies, 2 voices, and was last updated 5 years, 6 months ago by Alexander Bautz.
-
AuthorPosts
-
-
June 18, 2019 at 14:31 #25783
Hi,
I am using last version of autocomplete. Configuration is set to multiple values. I do not prefill any other fields.
Problem:
When i choose several existing items from search in my autocomplete field, save this data and then try to add new items with autocomplete, all data are wiped out in case that search return 0 values. Input field is red, i see old values under input field but value of field is empty string. Result is that previously saved data are lost.
I have attached screenshot where you can see that data are shown under input field but function getFieldValue returns empty string after search which returned 0 values.
Is it bug or feature ?
AC configuration:
spjs.ac.textField({
“applyTo”: “Lokalita”,
“helpText”: “”,
“loadText”: “”,
“listGuid”: “{B7CEDA7F-9E4A-4E1F-9ED3-D842D0CBBCA8}”,
“listBaseUrl”: “/sites/UCD”,
“showField”: “Title”,
“searchFields”: [],
“filterCAML”: “”,
“useREST”: false,
“preloadData”:false,
“filterREST”: “”,
“optionDetailFields”: [],
“optionDetailPrefix”: [],
“enforceUniqueValues”: true,
“rowLimit”: 15,
“listOptionsOnFocus”: false,
“minLengthBeforeSearch”: 3,
“reValidateOnLoad”: false,
“allowAddNew”: false,
“isLookupInSelf”: true,
“addNewAdditionalFields”: [],
“multiselect”: true,
“multiselectSeparator”: “; “,
“orderBy”: [“Title”],
“clearSetFieldsOnInvalidSelection”: false,
“setFields”: [],
“debug”: false
});Attachments:
-
June 18, 2019 at 21:48 #25798
Hi,
You are right, there is unfortunately a bug that clears the current selections in the hidden textarea when you search and return 0 values and you have multi-select turned on.I will include the fix in the next DFFS package, but in the meantime you can replace only the SPJS-ac.js file in your /SPJS/DFFS/plugins folder with the one attached. Please ensure it lists as v1.6.30 when checking the version by hovering over the “Enhanced with DFFS” link below the form. If it doesn’t you must clear the browser cache.
PS: You must unzip the file before replacing it.
Sorry for the inconvenience and best regards,
AlexanderAttachments:
-
June 19, 2019 at 07:33 #25802
Hi Alexander,
i have replaced SPJS-ac.js, but it still does not work. Cache has been cleared, forms reloaded. I have send link to video to your personal email where you can see behavior of bug and version of AC.
Thanks
-
June 19, 2019 at 11:55 #25806
Thanks for the video – it helped me see what was wrong. Because the query is handled differently when you use “useREST”: falsw and “useREST”: true I did not find all problems in the version I attached yesterday. I have now fixed what I hope is the last bug and attached a new version.
Please ensure it shows as v1.6.31 and let me know how it works out.
Alexander
Attachments:
-
June 19, 2019 at 12:05 #25809
Hi,
it is working now. Thank you.
Is it possible to remove RED border if no results is selected? For example after click X icon in input ?
Thanks
-
June 19, 2019 at 19:10 #25817
I’m glad it worked out – and yes, I have removed the red border when you clear the selection in the field – see attached version.
Alexander
Attachments:
-
-
AuthorPosts
- You must be logged in to reply to this topic.