Can this be used for 2 different lookups in the same form?

Forums SPJS-Lookup Can this be used for 2 different lookups in the same form?

Viewing 1 reply thread
  • Author
    Posts
    • #7353
      Jeff Law
      Participant

      I have a form with 2 different lookups in it that I want to use the SPJS-Lookup functionality for.

      One for Company Names which is contained in a Company List, and one for Project Names which is contained in a Project list.

      It is probably my ignorance, but I cant see how I can define 2 fields in the spjs.lookup.init command.

      Is this possible?

      Regards
      Jeff

    • #7360
      Alexander Bautz
      Keymaster

      Hi,
      You must repeat the entire function call:

      // First list
      spjs.lookup.init({
      	"fieldToConvertToDropdown":["Company"],	
      	"listName":"ListA",
      	"listBaseUrl":"/Sites/MySite",
      	...
      	...
      }); 
      
      // Second list
      spjs.lookup.init({
      	"fieldToConvertToDropdown":["Project"],	
      	"listName":"ListB",
      	"listBaseUrl":"/Sites/MySite",
      	...
      	...
      }); 

      Alexander

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