› Forums › Autocomplete › Set Value of Auto Complete
- This topic has 6 replies, 3 voices, and was last updated 1 year ago by
Alexander Bautz.
-
AuthorPosts
-
-
October 28, 2019 at 16:39 #27488
Wilson
ParticipantHi Alex,
Is there a correct way to set the value of an Auto Complete field programmatically? If I set the value in Cutsom JS as below, it does not remove the “help text” or trigger the “set field” function of Auto Complete.setFieldValue("CustomerAccount",getFieldValue("CustomerAccountNew"));
Thanks,
Wilson -
October 29, 2019 at 19:07 #27511
Alexander Bautz
KeymasterHi,
Unfortunately you cannot use setFieldValue to set the value of a field enhanced with the autocomplete plugin. If you need to set it programatically you can try setting it BEFORE you call the spjs.ac function to enhance it – and use the reValidateOnLoad setting to have it automatically try to resolve the value.Alexander
-
This reply was modified 1 year, 3 months ago by
Alexander Bautz. Reason: See new comment below
-
This reply was modified 1 year, 3 months ago by
-
November 2, 2019 at 09:32 #27553
Alexander Bautz
KeymasterHi,
I was wrong! – I did actually add this functionality earlier this year, but forgot to add it to the user manual for the AC plugin and only documented it in the ChangeLog.I have now updated the user manual with the correct function call to user.
Sorry for the inconvenience.
Alexander
-
February 6, 2020 at 19:02 #28564
Filipe Ribeiro
ParticipantHi Alexander
It works fine in case you’re not feeding other fields. I got the setFieldValue on Autocomplete working but the autocomplete does not update the others fields is using to fill up values thorough setFields π any suggestion ?
-
February 7, 2020 at 15:16 #28577
Alexander Bautz
KeymasterI’ll have to look into that and if it’s broken I’ll fix it in the next version.
Alexander
-
February 13, 2020 at 11:39 #28654
Alexander Bautz
KeymasterI have fixed a bug in the script and will try to get a new version of the DFFS package released later today.
Alexander
-
February 13, 2020 at 20:33 #28677
Alexander Bautz
KeymasterHere is the new version: https://spjsblog.com/2020/02/13/dffs-package-updated-to-v4-4-4-23/
Let me know how it works out.
Alexander
-
-
AuthorPosts
- You must be logged in to reply to this topic.