Allow value not in dataset to be added without updating dataset

Forums Autocomplete Allow value not in dataset to be added without updating dataset

Viewing 1 reply thread
  • Author
    Posts
    • #34360
      Paul Heffner
      Participant

      Auto-Complete is amazing and working completely as intended. My user though, would like to complete a list item when the Auto-complete doesn’t find a record without updating the lookup list.

      I figured it might have to do with the invalid selection callback but didnt know it I destroy the autocomplete in this case or set the field value.

      Hope this makes sense.

    • #34363
      Alexander Bautz
      Keymaster

      I’m not sure I understand what you mean. Do you want to just “add your owns value” like in a choice field without adding this to the lookup list?

      If so you must add a custom button in a HTML section below or above your field and have a button call the spjs.ac.destroy function as describe here: https://spjsblog.com/dffs/dffs-plugins/spjs-autocomplete/#Remove_the_autocomplete

      This will remove the AC functionality and show the single line of text field.

      To ensure the AC script doesn’t just clear this invalid value when you edit the record you must also set reValidateOnLoad to false: https://spjsblog.com/dffs/dffs-plugins/spjs-autocomplete/#reValidateOnLoad

      Alexander

Viewing 1 reply thread
  • You must be logged in to reply to this topic.