Trigger API: Autofill & Submit

These JavaScript API callbacks allow you to verify that Kiosk Pro successfully autofilled a username & password pair for a specific URL and can also be used to immediately trigger submission after a form is autofilled.

Callbacks

Related Settings

Requirements

  • Access JavaScript API
    • By Import - recommended, works both online & offline, requires inclusion of kiosk_functions.js prior to any of the following calls.
    • By Injection - only works offline, may not be available 'onload' event.
  • Autofill
    • Enable = On
    • Autofill Settings
      • Group 1 > Matched URLs = URL to your page
      • Group 1 > Username = string of your choice
      • Group 1 > Password = string of your choice
      • Group 1 > Username Field Identifier = identifier for the username input tag, such as an id or name
      • Group 1 > Password Field Identifier = identifier for the password input tag, such as an id or name

Sample Code

This sample code relies on the JavaScript APIs built into Kiosk Pro and will not run successfully in other browsers or within our in-app help interface.  
To run sample code, set the app's homepage to   http://www.kioskproapp.com/autofill

kp_Autofilling_didSuccessfullyFillUsingGroup

This callback is triggered when Kiosk Pro has successfully autofilled a username & password on a matched page.

Format
kp_Autofilling_didSuccessfullyFillUsingGroup(groupURL, numberOfGroup, numberOfAllGroups, loginId, loginValue, passwordId);
		
Return values
  • groupURL = contains the URL configured in Kiosk Pro settings that matched the current page. If multiple URL's match, they will be included, separated by semicolons.
  • numberOfGroup = number of current username/password pair. This will always be '1' unless you've defined multiple username/password pairs on the same matched URL.
  • numberOfAllGroups = total number of matched username/password pairs on the current page. When numberOfGroup == numberOfAllGroups, Kiosk Pro has completed all available autofilling.
  • loginId = ID of login element provided in Kiosk Pro settings.
  • loginValue = value of login element provided in Kiosk Pro settings.
  • passwordId = ID of password element provided in Kiosk Pro settings.

Note: The API does not pass the password value for security reasons.


kp_Autofilling_didFailMatchingUsingGroupURL

This callback is triggered when Kiosk Pro has not found a URL in Autofill settings that matches the current page, indicating that there is not a username/password pair available for this page or that the Autofill settings have been incorrectly configured.

Format
kp_Autofilling_didFailMatchingUsingGroupURL(groupURL, numberOfGroup, numberOfAllGroups, loginId, loginValue, passwordId);
		
Return values
  • groupURL = contains the URL configured in Kiosk Pro settings that matched the current page. If multiple URL's match, they will be included, separated by semicolons.
  • numberOfGroup = number of current username/password pair. This will always be '1' unless you've defined multiple username/password pairs on the same matched URL.
  • numberOfAllGroups = total number of matched username/password pairs on the current page. When numberOfGroup == numberOfAllGroups, Kiosk Pro has completed all available autofilling.
  • loginId = ID of login element provided in Kiosk Pro settings.
  • loginValue = value of login element provided in Kiosk Pro settings.
  • passwordId = ID of password element provided in Kiosk Pro settings.

Note: The API does not pass the password value for security reasons.


kp_Autofilling_didFailFillUsingGroup

This callback is triggered when Kiosk Pro matches a URL configured in Kiosk Pro settings to the current page, but is unable to successfully identify the username and/or password field based on the information provided.

Format
kp_Autofilling_didFailFillUsingGroup(groupURL, numberOfGroup, numberOfAllGroups, loginId, loginValue, passwordId);
		
Return values
  • groupURL = contains the URL configured in Kiosk Pro settings that matched the current page. If multiple URL's match, they will be included, separated by semicolons.
  • numberOfGroup = number of current username/password pair. This will always be '1' unless you've defined multiple username/password pairs on the same matched URL.
  • numberOfAllGroups = total number of matched username/password pairs on the current page. When numberOfGroup == numberOfAllGroups, Kiosk Pro has completed all available autofilling.
  • loginId = ID of login element provided in Kiosk Pro settings.
  • loginValue = value of login element provided in Kiosk Pro settings.
  • passwordId = ID of password element provided in Kiosk Pro settings.

Note: The API does not pass the password value for security reasons.

Still stuck? How can we help? How can we help?