Error on multiselect

Forums Autocomplete Error on multiselect

This topic contains 1 reply, has 2 voices, and was last updated by  Alexander Bautz 6 months, 1 week ago.

  • Author
    Posts
  • #25207

    Kelvin Reu
    Participant

    Hello!

    I have an ac-field like this:

    
    
    spjs.ac.textField({
        "applyTo": "lvmPartner1",
        "helpText": "Wählen Sie einen Vertragspartner aus...",
        "listGuid": "{7FB1616E-630C-4FFF-9929-818980E38C8C}",
        "listBaseUrl": "/ccdev",
        "showField": "FirstName",
        "multiselect": true,
        "multiselectSeperator": ";",
        "enforceUniqueValues": true,
        "rowLimit": 15,
        "preloadData": true,
        "listOptionsOnFocus": true,
        "minLengthBeforeSearch": 3,
        "reValidateOnLoad": false,
        "allowAddNew": true,
        "isLookupInSelf": false
    });

    By loading the form, this error shows up:

    DFFS There is an error in the Custom JS textarea:
    TypeError: Cannot read property ‘length’ of undefined

    Whern I change multiselect to false, it works correctly but of course without multiselect.

    What am I doing wrong?

  • #25223

    Alexander Bautz
    Keymaster

    Try adding the missing configuration options like shown here: https://spjsblog.com/dffs/dffs-plugins/spjs-autocomplete/#Autocomplete_in_a_text_field

    If you still get the error, please use Google Chrome and click the link to the right of the error, then click the {} symbol in the bottom left corner of the “Source” tab to “pretty print” the code and then take a screenshot I might be able to figure it out.

    Alexander

You must be logged in to reply to this topic.