Set Value of Auto Complete

Forums Autocomplete Set Value of Auto Complete

Viewing 6 reply threads
  • Author
    Posts
    • #27488
      Wilson
      Participant

      Hi 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

      Attachments:
    • #27511
      Alexander Bautz
      Keymaster

      Hi,
      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 10 months, 3 weeks ago by Alexander Bautz. Reason: See new comment below
    • #27553
      Alexander Bautz
      Keymaster

      Hi,
      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

    • #28564
      Filipe Ribeiro
      Participant

      Hi 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 ?

    • #28577
      Alexander Bautz
      Keymaster

      I’ll have to look into that and if it’s broken I’ll fix it in the next version.

      Alexander

    • #28654
      Alexander Bautz
      Keymaster

      I have fixed a bug in the script and will try to get a new version of the DFFS package released later today.

      Alexander

    • #28677
      Alexander Bautz
      Keymaster

      Here 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

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