π UPDATE π
All of the help content here has been used to train our new AI helpdesk chatbot, LightningAutofillPro. You can now go there to ask about anything related to Lightning Autofill, even how to write JavaScript rules. The best part is, in most cases you should be able to communicate with LightningAutofillPro in your native language. We recommend you bookmark LightningAutofillPro for quick reference in the future.
Introduction
Lightning Autofill is not like the typical autofill feature built into modern browsers that prompt to fill out your address information. The browser autofill generally works fine, and you should continue using it for such purpose. While the Lightning Autofill extension can be used to autofill addresses, it's more an automation tool to reduce your work load and help protect against wrist injuries. Any text input or interaction that you can do using the mouse or keyboard can probably be automated using Lightning Autofill, especially if you are proficient at JavaScript.
The core concept is (1) you create autofill rules and (2) the rules are automatically executed when you land on a web page that satisfies one or more rule definitions. Lightning Autofill's main UI is the infobar, which is where you execute and generate rules. For quick access, it's a good idea to assign a global hotkey to launch the Lightning Autofill infobar. Autofill rules are managed from the Options page, which is what the rest of this documentation will cover.
Basic Usage
To add a new autofill rule, click the button at the bottom of the rules table. Rules are processed in the order in which they appear except for JavaScript rules, which are executed last. To reorder a rule, click the icon and drag it up or down, or drag anywhere on the row where you see the move cursor (this can also be done using Keyboard Shortcuts for keyboard warriors). To perform an action on an autofill rule, click one of the following buttons to the right of the rule:
- = delete rule
- = move rule to a different profile
Click the π button to toggle the search box. You can search for text in any of the columns in the rules table as well as the profile name and site filter (see below). Remember to click the Save button after you have modified one or more rules.
Defining an Autofill Rule
This is where you define all the form fields to automatically fill on page load. A form field, also known as a form control or form element, is used to submit data from the client (your browser) to the server. Below is a detailed description of each column in the rules table.
TIP: The quickest way to define autofill rules is to use the infobar to automatically create all of the rules for you. To generate rules for the entire form, right-click on the page and select "Add rules for this form" from the Lightning Autofill context menu, or click the Lightning Autofill bolt icon and expand the Generate Rules section. To generate a rule for one particular text/password input field only, right-click inside that input field and select "Add rule for this field" from the Lightning Autofill context menu. Once the rules are created, you can click the Lightning Autofill logo in the infobar to open the Options page and fine-tune them if you wish. No more digging through the source code!
- Type: The type of form field you would like to autofill.
- Text β Select this to autofill text and hidden inputs (
<input type="text">
,<input type="email">
,<input type="number">
,<input type="search">
,<input type="hidden">
), multi-line text boxes (<textarea>
), and iframe-based WYSIWYG edit boxes commonly found in forums and blogs. - Password β Select this to autofill password fields (
<input type="password">
). - Select β Select this to auto-select dropdown menus and listboxes (
<select>
).NOTE: Many modern websites use frameworks like Bootstrap to render highly stylized dropdown menus constructed from
<div>
s. For these sites you'll need to find the hidden<select>
elements binded to these "rich" dropdowns (usually immediately above them) in order to create your Select autofill rules. There are also some sites that output the selected value to a hidden field. In such cases, creating a rule based on the Select field type won't work; you'll need to identify the hidden field used for that dropdown menu and create a Text rule instead. - Checkbox/Radio β Select this to auto-check or uncheck checkboxes (
<input type="checkbox">
) and radio buttons (<input type="radio">
). - JavaScript β Select this to execute arbitrary JavaScript code when the page loads (as soon as the DOM is ready). In order to execute JavaScript rules, you need to enable developer mode if you're using Chrome or Edge (this is a new MV3 security policy). Check out some sample JavaScript rules to get started.
PRO: This feature is only available to Pro subscribers.
- AUTOFILL...WAIT β See Actions section below.
- Text β Select this to autofill text and hidden inputs (
- Name: This is where you identify which fields to autofill. You can match against the following attributes:
aria-describedby
aria-label
aria-labelledby
autocomplete
class
data-bind
(Knockout)data-reactid
(React)id
name
ng-model
(AngularJS)placeholder
src
(only applicable to iframe-based rich text editors)title
value
(only applicable to checkbox/radio inputs)
Enter the full or partial text that matches one of the attribute values above for the field you want to autofill. If you want to do an exact match instead of partial match, then enter
^name$
; if you want to do a word boundary match (i.e., only matching whole words), then enter\bname\b
. If nothing is entered here, all fields of the selected type (Type column) will be autofilled, so leave it blank with caution. Every HTML form element should have at least one of these attributes. To quickly inspect a field's attributes, right-click on the field and select "Inspect element" from the context menu; alternatively, you can also view the source code (Ctrl + U) and search for the tag manually. Here are some more notes on this column:- CSS selectors and XPaths are supported. If this value starts with a forward slash (
/
), then it will be treated as an XPath. - Regular expressions (often shortened to "regex") are supported when matching the attributes above, which makes Lightning Autofill quite flexible.
- If you want to match one of the following reserved regex characters literally, then you need to precede it with a backslash (
\
):^ $ . ? + * \ | ( ) { } [ ]
- Comments (everything between
/*
and*/
) are ignored. - Partial match is accepted.
- Match is case insensitive.
- Leading and trailing spaces are stripped.
- This column is optional.
This column supports
{@variable_name}
and{field reference}
variable expansion (see Settings for more information).TIP: Regular expressions' lookbehind assertion (
?<=
and?<!
) allows you to create highly complex text patterns such as the one below, which matches anything that contains "name" but is not immediately preceded by "first" or "last":
(?<!first|last)name
This will, for example, match "fullname" and "username", but NOT "firstname" or "lastname" (you can create this rule and see it in action on the Practice Form). - Value: The nature of this value changes depending on what field type is selected in the Type column.
- If Type = Text or Password, then enter the text that is to be autofilled.
- If Type = Select, then you can enter two types of values. First, you can enter the text or
value
attribute value of the option item you would like to auto-select. The value has to be double-quoted and regex is not supported in this context. You can also enter the index number of the option item to automatically select (the first item has an index of 0). For multi-select listboxes, separate each double-quoted value or index number with a pipe (|
). Enter!
or leave blank (1!
and0!
will also work) to select or unselect all items in the list, respectively. Example: if you want to select the first and third items in a multiple selection listbox, then enter0|2
(0 2
will also work); if you want to select A and C in a list comprising A, B, C, D, and E, then enter"A"|"C"
. Enter?
to randomly select one item from the dropdown menu or multi-select list. - If Type = Checkbox/Radio, enter
1
to check or0
to uncheck. If it's a checkbox or radio group and you can only match using thename
attribute, then you'll have to specify1
or0
for each input in the group. Append!
at the end to check/uncheck all items. Enter?
to randomly toggle the checkbox. Example: if you want to check the second item in a four-item radio button group, then enter0100
; to check all checkboxes, enter1!
. - If Type = JavaScript, then enter the JavaScript code to execute here or click Edit to edit it in the code editor (JavaScript code will always be evaluated last). This opens up a world of possibilities if you are familiar with JavaScript. For example, you could add a rule to auto-submit the form after all fields have been autofilled. You can use JavaScript rules to simulate almost anything that a human can do (see rules.txt for some ideas).
- If Type = ACTION (AUTOFILL...WAIT), then see Actions section below.
All field types except Checkbox/Radio support variable expansion; JavaScript rules only support
{@variable_name}
variables (see Settings for more information).NOTE: The data saved by Lightning Autofill is NOT encrypted, so any text you enter here remains in the clear. I do NOT recommend using this extension to save passwords of sensitive accounts.
- Site: If you would like to activate Lightning Autofill only on certain websites, then enter any part of the document title (text inside
<title>
tag) or URL here. The title or URL of the site you're on has to match the pattern you enter here in order to trigger the autofill. This basically allows you to define form fields to autofill on a per-site basis. If this box is left blank, then autofill will be performed on all sites not matching what's listed in the Exceptions tab. Here are some more notes on this column:- Regular expressions (regex) are supported, so you can easily bind an autofill to multiple domains (e.g.,
google.com|yahoo.com
). - If you want to match one of the following reserved regex characters literally, then you need to precede it with a backslash (
\
):^ $ . ? + * \ | ( ) { } [ ]
- Put multiple filters on separate lines (or use the
|
pipe character, which means "OR" in regex). - Partial match is accepted.
- Match is case insensitive.
- Spaces and line breaks are stripped.
- This column is optional.
This column supports
{@variable_name}
variable expansion (see Settings for more information). - Regular expressions (regex) are supported, so you can easily bind an autofill to multiple domains (e.g.,
- Mode: The form fill method to use when autofilling. This option is only applicable to Text and Password rules. Backup rules and hidden fields will always be filled using the Safe mode by default.
- Safe β Select this method to autofill only fields that are empty. This is the default method to be on the safe side.
- Overwrite β Select this method to autofill all fields, including non-empty fields.
- Prepend β Select this method to insert Value at the beginning of the field.
- Append β Select this method to insert Value at the end of the field.
- Wrap β Select this method to insert Value at the beginning and end of the field.
- Increment β Select this method to add 1 to the existing field if it contains a number.
- Decrement β Select this method to subtract 1 from the existing field if it contains a number.
Actions
Actions allow you to perform basic automations without any knowledge of JavaScript. For more complex automations, you can use JavaScript rules.
- AUTOFILL β Execute a profile. Enter a profile ID to execute, along with an optional delay time in seconds, in the Value column. This action is equivalent to the
Autofill()
function. - CLICK β Click on an element. Enter a CSS selector or XPath to target the element to click in the Name column. This action is useful for going to the next step or auto-submitting forms after autofilling them.
- DISPATCH β Dispatch one or more JavaScript events to an element. Enter a CSS selector or XPath to target the element to send events to in the Name column. Enter the event names in the Value column. This action may be required for form fields that expect some event to be fired to trigger input validation, etc.
- OPEN β Open a URL. Enter the URL to open in the Value column. If you want to open the URL in a new tab, then add a
target
attribute value after the URL (separated by a space). - RELOAD β Reload the web page. Leave both the Name and Value columns empty to reload once. Enter the interval time in seconds (minimum = 1) in the Value column to reload the page at every interval. If you want to reload the page until an element is present on the page, then enter a CSS selector or XPath to target this element in the Name column. This action is useful for polling operations, such as reloading a product page until the product is in stock.
- SCRAPE β Extract text from an element. Enter a CSS selector or XPath to target the element to scrape in the Name column. Enter the variable name to store the extracted text in in the Value column. If the variable is "my_name", then you'll be able to use this variable in subsequent autofill rules by entering
{@my_name}
. - STYLE β Override the web page's style with custom CSS. Enter one or more CSS rules to inject into the document in the Value column. This action is useful to hide elements, highlight elements, and customize the page to whatever you want it to look like.
- WAIT β Wait before executing the next rule. Enter the delay time in seconds in the Value column. If you want to wait for an element to exist, then enter a CSS selector or XPath to target this element in the Name column, in which case the delay acts as a timeout. This action is useful on pages where elements are not matched on page load because they are added to the document dynamically after loading.
Profiles
Profiles allow you to organize all your autofill rules into different categories. For example, you can have separate profiles for addresses, personal info, account logins, blog post templates, and advanced search forms. To add, rename, rearrange, delete, duplicate, and sort profiles, select "Manage..." from the profile chooser to bring up the Manage Profiles dialog. If you delete an existing profile, you have the option to also delete all rules assigned to that profile or delete only the profile and move all rules to Unfiled. Shift- and Ctrl-click on multiple profiles to perform bulk operations on them. After making changes, click the Save and Close button to save your changes; clicking Cancel, clicking anywhere outside the dialog, and pressing Esc will discard all your changes. You can assign an autofill rule to a profile by clicking to move it into the profile, or simply by switching to that profile and adding a new rule (rules added while viewing all profiles will be assigned to Unfiled).
Lightning Autofill's default behavior is to only process rules in the active profile. An active profile is the last profile you viewed in Options or the last profile you executed. If you want to execute all matching rules regardless of what the active profile is, then disable the "Autofill active profile only" option (see Settings).
Site β If you would like to restrict all of the autofill rules in a profile to a certain page or domain, then enter any part of the document title (text inside <title>
tag) or URL here.
This is similar to the Site column in the rules table, but works at the profile level.
Note that rule-level site filters take priority over the profile site filter.
As with the Name and Site columns, this field takes a regex, so these reserved characters should be escaped (i.e., preceded with a backslash): ^ $ . ? + * \ | ( ) { } [ ]
Hotkey β Enter a hotkey combination here to be able to quickly execute all the rules in this profile by pressing the assigned hotkey.
NOTE: Some hotkeys may not work if there is a conflict with another software or extension, or the hotkey is reserved by the operating system or browser.
You can set profile- and rule-level overrides here. Each line needs to follow this syntax:
profile/rule ID: parameters
The following parameters are available:
all=true|false
β set totrue
to execute the rule regardless of what the active profile is when the "Autofill active profile only" option is enabled (default isfalse
)delay=n
βn
is the number of seconds to wait before autofilling; this overrides the global delay option (default is0
)forcefill=true|false
β set totrue
to always autofill, even when in manual mode (default isfalse
)parselabels=true|false
β set totrue
to always parse labels when generating rules; set tofalse
to never parse labels when generating rules
Multiple options can be separated by spaces, e.g.:
r1: delay=2 forcefill=true
If you supply a profile ID, then the options will apply to all the rules in that profile; if you supply a rule ID, then the options will apply only to that specific rule. Profile and rule IDs are listed in the first column when you export the data.
TIP: You can quickly see a profile's ID by hovering the mouse over the profiles dropdown menu or "move rule" button when in the "All" profile.
A rule's ID is the same as its field reference (displayed in the tooltip when you hover over the Name or Value field), except that it starts with "r".
For example, if the reference for Name is n1
, then the rule ID would be r1
.
To see all of the profile and rule IDs, export your data (see Import/Export).
This is a global list of exceptions, similar to a blacklist.
Any document title (text inside <title>
tag) or website URL that matches a pattern listed in this list will be ignored by Lightning Autofill.
Exceptions take precedence over the Site column and profile Site filter in the Form Fields tab.
Some more things to note:
- Regular expressions (regex) are supported.
- If you want to match one of the following reserved regex characters literally, then you need to precede it with a backslash (
\
):^ $ . ? + * \ | ( ) { } [ ]
- Enter one exception per line.
- Partial match is accepted.
- Match is case insensitive.
- Spaces and empty lines are stripped.
Text clips are snippets of boilerplate text that can be inserted into text fields via the right-click context menu. They are also used as the source of shortcodes for the autocompletion / text expansion feature. Text clips should be defined using this syntax:
Category (optional) > Title Text to be inserted === Title Text to be inserted
The category will appear as a submenu under Lightning Autofill / Insert text clip.
You can organize your text clips using as many categories and subcategories as you like; the text to the right of the last >
on the first line will always be the title.
Separate each text clip with ===
on its own line.
The text clip will be inserted at the cursor position inside the text field, or replace whatever text you have selected.
Here are a few sample text clips:
Business Card Bob Smith 321 Test Dr Nowhereville, CA 90000 (408) 767-2676 === Personal > Email > Gmail bob@gmail.com === Personal > Email > Yahoo bob@yahoo.com === Work > Email bob@smith.com
NOTE: Chrome has a limit of 998 total context menu items, four of which are already used by Lightning Autofill. This leaves us with a maximum of 994 text clips. Since categories are displayed as submenus and each submenu also takes up a menu item slot, use categories sparingly because each category used means one fewer text clip that can be defined.
If you have text that you would like to reuse across multiple rules, then you can assign the text to a variable and reference it in the Value field. Each line needs to follow this syntax:
variable_name = some text
Variable names can only contain letters, numbers, and the underscore character.
The text cannot contain line breaks; if you want to output a line break, then use \n
instead.
You can even set a variable to a value returned by JavaScript.
Any line starting with "#" is treated as a comment and will not be evaluated.
Here are some examples to get you started (more in variables.txt):
# Example: Monday, January 17, 2022 (format is region-specific)
long_date = javascript:new Date().toLocaleDateString('en-us', { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric'})
# Example: 1/17/2022 (format is region-specific)
short_date = javascript:new Date().toLocaleDateString()
To use a variable in a rule, enter {@variable_name}
.
PRO: JavaScript variables are only available to Pro subscribers.
Subscription
After you subscribe, you should be getting an order confirmation email from Stripe. If you don't see it, look in your spam/junk folder. Inside this email there should be an invoice number. Enter this invoice number in the text field and click the Activate button. After a few seconds, the button should change to "Activated" to confirm that your subscription has been activated successfully. Click the Manage Subscriptions button to go to the customer portal where you can do things like update your payment method, change subscription plans, and cancel your subscription.
Operation
- Attributes to remove β Check this box to automatically remove attributes on page load. Enter the attributes as a space-separated list. This is a good way to remove attributes that can be annoying (e.g.,
autocomplete
) or prevent Lightning Autofill from working properly (e.g.,readonly
). No autofill rules are required for this option to work, but the site you're on needs to match the active profile's site filter if one is defined. - Autofill active profile only β Check this box to only execute autofill rules in the active profile (the profile you last executed or selected in Options). Uncheck this box if you want all rules from all profiles to be executed if the URL matches the site filter. Note that if you disable this option, every rule should have a site filter or it can lead to unexpected results since rules are matched by the Site field first, then by the Name field. This option can be overriden with the
all
parameter in Advanced. - Autofill delay β Check this box to add a delay before Lightning Autofill rules are executed. This option should no longer be required starting with Lightning Autofill v6.8.0 since it monitors the web page for dynamically generated fields and autofills them as they are inserted into the document. Note that this setting does not apply to backup rules, which are always executed 250ms after page load. This option can be overriden with the
delay
parameter in Advanced. - Randomize delay β Check this box to add a random offset of between -0.5 and 0.5 seconds to the delay time you set above. This should make Lightning Autofill behave more like a human and hence less likely to be identified as a bot. This option is useful for sites where you have a limited time to do something and they block bots from automating the task using bot detection techniques.
- Back up text fields β Check this box to automatically save text fields in case Chrome crashes. Now you can have the peace of mind that while you're inputing data into a form, everything you type is backed up in real time. The backup rules are saved to a special profile called "Backup - {site domain}". Backup profiles are unique in that they will always be automatically executed without having to set the profile as active. To avoid polluting the profiles list, backup profiles are only displayed on the Options page where you can manage them there. Note that password fields are never backed up for your own protection.
- Debug mode β Check this box to show debugging messages in the Chrome console. To open the console, press Ctrl + Shift + J. This is useful for troubleshooting if you want to see which rules are executed on a particular web page.
- Expand variables β Check this box to replace a
{
...}
variable with its output. There are currently five types of variables you can use in the Value field:{@variable_name}
β This variable outputs the text assigned to the variable defined in the Variables tab.{field ID}
β This variable outputs the value of the referenced Name or Value field. The field ID is the same as the rule ID (displayed when you hover the mouse over the table row), except you replace the "r" with "n" (Name) or "v" (Value). Note that you can only reference another field within the same profile, unless the active profile is "All". Examples:{n1}
,{v2}
{<number>++}
/{<number>--}
or{<number>+<step>}
/{<number>-<step>}
β The variable containing++
/--
increments/decrements the number by one every time it is autofilled. To specify a custom iteration step, add+
/-
and the step amount after the number ({10++}
is equivalent to{10+1}
and{10--}
is equivalent to{10-1}
).{#}
or{#<number>}
β This variable outputs a random number. You can specify the number of digits after#
({#1}
is equivalent to{#}
). Example: to generate a random telephone number, you would enter({#3}) {#3}-{#4}
{#<number>-<number>}
β This variable outputs a random number within a range (inclusive). Example: to generate a random number between 1 and 100, you would enter{#1-100}
{$}
or{$<number>}
β This variable outputs a random alphanumeric string. You can specify the number of characters after$
({$1}
is equivalent to{$}
). Example: to generate a 16-character alphanumeric string, you would enter{$16}
{a}
or{a<number>}
β This variable outputs a random lowercase alphabetic string (aβz). You can specify the number of characters aftera
({a1}
is equivalent to{a}
). Example: to generate a 10-character lowercase alphabetic string, you would enter{a10}
{A}
or{A<number>}
β This variable outputs a random uppercase alphabetic string (AβZ). You can specify the number of characters afterA
({A1}
is equivalent to{A}
). Example: to generate a 10-character uppercase alphabetic string, you would enter{A10}
{%}
or{%<number>}
β This variable outputs a random hexadecimal string. You can specify the number of characters after%
({%1}
is equivalent to{%}
). Example: to generate a random CSS hex color value, you would enter{%6}
{word1|word2|...}
β This variable acts like a text spinner, randomly outputting one word from a list of words that you specify. Example: to output "red", "green", or "blue" randomly, you would enter{red|green|blue}
{(word1|word2|...)}
β This variable is like a text spinner (see above), except every time a word is outputted it is removed from the set (you can call it a shrinking text spinner).{word1,word2,...}
β This variable outputs the words in sequential order as listed instead of randomly. When the last word in the list is outputted, it starts from the beginning again. Example: to output "red", "green", and "blue" in that order, you would enter{red,green,blue}
{(word1,word2,...)}
β This variable is like a sequential list (see above), except every time a word is outputted it is removed from the list (you can call it a shrinking sequential list).
NOTE: For text spinners and sequential lists, you need to escape the following characters with a backslash (
\
):, | ( ) { }
. You cannot use these variables inside a JavaScript rule, with the exception of{@variable_name}
variables. - Manual mode β Check this box to trigger Lightning Autofill only when you select a profile to execute under Execute Profile. If you don't like the idea of Lightning Autofill automatically filling out forms and prefer to manually choose which profile to execute, then this option is for you. This option can be overriden with the
forcefill
parameter in Advanced.TIP: Hotkeys go really well with manual mode, so be sure to set them for profiles that you intend to use frequently. You can also set a global hotkey to open the infobar and quickly search for a profile to execute.
- Overwrite by default β Check this box to set the default form fill method to Overwrite. This option does not apply to backup rules, which always default to Safe mode.
- Site filters β Check this box to automatically add a site filter when generating autofill rules (highly recommended). Given the sample URL https://www.google.com/search?hl=en&q=autofill#top, here is the site filter that would be defined for each policy:
- Domain β
google.com
- Domain + Path (default) β
google.com/search
- Domain + Path + Query β
google.com/search?hl=en&q=autofill
- Domain + Path + Query + Hash β
google.com/search?hl=en&q=autofill#top
- Domain β
- Skip hidden fields β Check this box to bypass autofilling fields that are not visible on the screen. This option can be used to avoid fields that are intentionally hidden (e.g.,
<input name="trap" style="display:none">
) to act as a honeypot to detect spambots and render the form submissions invalid. Read this article for more information. - Turbo mode β Check this box to boost the autofilling speed for each field, which can add up if the form has a lot of fields. By default, there is a 0β10 milliseconds delay after each keyboard event that is emitted to simulate a human filling out a field, but you can bypass this artificial lag by enabling turbo mode. It is disabled by default because there's a slim chance some forms may not autofill 100% reliably if the autofill operation is too fast.
Interface
- Auto-close infobar β Check this box to choose when to automatically close the Lightning Autofill infobar; otherwise, the infobar will remain open until you manually close it by clicking the "x" icon or pressing Esc (if the focus is inside the infobar).
- Context menu β Check this box to access Lightning Autofill from the right-click context menu. You can choose to display all profiles in "Execute profile" as a flat list, or group the profiles into submenus organized by the first character of the profile names (this makes navigating much easier if you have a ton of profiles). If you remove the context menu, then you can always access Lightning Autofill by right-clicking on the extension icon (lightning bolt) in the toolbar. Note that context menu items for text fields ("Insert text clip" and "Add rule for this field") will always be visible.
- Developer mode popup β Check this box to display a popup window with instructions on to enable developer mode for the Pro plan (required to process JavaScript rules and variables).
- Filter profiles β Check this box to only show profiles in the infobar whose site filter matches the current web page. This option ignores rule-level site filters and performs the match strictly based on the profile-level site filter.
- Fluid layout β Check this box to resize the rules table and text boxes to fill the viewport (visible window height) to reduce scrolling. Keep this option enabled if you want the controls at the bottom of the page to always be visible without having to scroll down.
- Hide backup profiles β Check this box to suppress showing backup profiles in the Profiles list. If you have the "back up text fields" option enabled, your Profiles list can quickly be flooded with backup profiles, so this is a way to keep it clean.
- Icon badge β Check this box to show the number of rules executed on the extension icon (lightning bolt). If you do not see the lightning bolt icon, then it's likely hidden away in an extensions submenu. For example, in Chrome try clicking the icon that looks like a puzzle piece; if the lightning bolt icon is there, click the pin icon to ensure Lightning Autofill is always visible on the toolbar.
- Import/Export text box β Check this box to enable the legacy text box that was used for both the import (as input) and export (as output) operations.
- Mask passwords β Check this box to blur passwords in the Form Fields table. This is to improve security in case someone is standing behind you or looking over at your screen. The password is revealed when you click into the field.
- Regex warnings β Check this box to enable warnings about unescaped reserved characters in regular expressions (regex) when editing fields that support regex (Name, Site). A common cause of failure in custom autofill rules that you add yourself is when you're trying to match a field name containing a regex reserved character such as
[
and]
and forgetting to escape it with a backslash (\
) in your rule. For example, in the Name column you enterlist[0].hostname
(bad) instead oflist\[0\].hostname
(good). The dot (.
) is also a reserved regex character, but since it matches any character except a line break, in most cases you don't need to escape it. - Sound effects β Check this box to play sound effects after every autofill operation. Keep in mind that Lightning Autofill also works on hidden iframes, so if this option is enabled and on the rare occasion you go to a page that triggers an autofill rule only in the hidden iframe, then you will still hear the sound effect even if nothing is autofilled in the main (parent) document.
TIP: You can customize the sound effects by replacing
sound.ogg
with your own audio file. On Windows,sound.ogg
is located in %USERPROFILE%\Local Settings\ Application Data\ Google\ Chrome\ User Data\ Default\ Extensions\ nlmmgnhgdeffjkdckmikfpnddkbbfkkk\ {version number}. If you're using Mac or Linux, then try searching for "sound.ogg". There are two requirements for the audio file: (1) it has to be in Ogg Vorbis format, and (2) it has to be at least 0.4 seconds in length. - Theme β Check this box to enable a color scheme for the Options page. A bunch of themes are included, but you can choose your own colors by selecting Custom from the dropdown menu. The "Auto" theme selects the default light or dark (black) theme based on your device settings.
- Tooltips β Check this box to show helpful tooltips when you hover the mouse cursor over buttons and some other GUI controls. Sometimes the tooltips can get in the way of reading what's on the screen, so if you're already familiar with the interface, you can disable this option.
Experimental
NOTE: The options in this section are considered experimental. They provide a sneak peek of new features, but they may not be in a stable state. Please keep this in mind when enabling these options.
- Autocomplete trigger character β Check this box to enable autocompletion / text expansion. Enter the character you would like to use as the trigger. Any character is accepted, but a symbol or punctuation mark is recommended. For example, if the trigger character is
:
(the default), then typing::
would display the autocomplete widget, and typing:shortcode:
would expand the shortcode into the full text without showing the autocomplete widget. Shortcodes are defined in the Text Clips tab. Keyboard shortcuts are available for the autocomplete widget. -
Autofill CAPTCHAs β Check this box to automatically solve CAPTCHA challenges. Currently, only Google's reCAPTCHAs are supported, but we hope to be able to add other types down the road as they become more reliable. You can test this feature on the sample form, but don't reload this page too many times or you might be flagged as a bot and get the "automated queries" error message.
PRO: This feature is only available to Pro subscribers.
- Bi-directional cloud sync β Check this box to enable two-way cloud synchronization. With this option enabled, changes that you make in the active Google Sheets spreadsheet are automatically synced to Lightning Autofill. In theory, you could manage all your data in Google Sheets and never have to open Options.
- Parse labels β Check this box to try and use the form field's label text for the Name column in autofill rules. This works on fields with the
aria-labelledby
attribute or bound to a<label for="...">
element. Using labels to target elements can result in autofill rules that are too generic, which can lead to unexpected results, so enable this option at your own risk. This option can be overriden with theparselabels
parameter in Advanced. - Profile expiration β Check this box to automatically delete profiles that have expired. The expiration date needs to be included in the profile name using the syntax "Expires: YYYY-MM-DD" (e.g.,
My profile [Expires: 2024-08-01]
). Every day at midnight, Lightning Autofill will delete all profiles (and associated rules) that have an expiration date equal to or older than the current date.
Google Sheets
If you connect your Google account, Lightning Autofill will automatically back up all data to a Google Sheets spreadsheet called "Lightning Autofill backup". Now you can have the peace of mind that if you ever lose access to your computer or accidentally remove Lightning Autofill, your data would still be safe in the cloud.
- Connect β Click this button to begin the connection process. After you have successfully connected, this button will be replaced with Disconnect (see below).
NOTE: In the Google authorization popup, be sure to check the box below to grant Lightning Autofill permission to perform the cloud sync.
- Open in Sheets β Click this button to open the "Lightning Autofill backup" spreadsheet in Google Sheets. Instead of managing your autofill rules in Options, you can manage them in Google Sheets and sync your changes back to Lightning Autofill by clicking on the Restore button (see below). Here are some of the things that you can do in Google Sheets:
- Add additional columns after the "HELP" column
- Add additional sheets (sheets can be in any order)
- Filter data
- Format cells
- Record macros for automation
- Rename the spreadsheet (you can keep multiple files and choose which version to restore)
- Resize columns and rows
- Search (and replace)
- Sort rows
- Delete or move any of the default columns
- Delete or rename any of the default sheets
- Remove any of the data validation rules
- Rename any of the default column headers
- Default spreadsheet name β This is the default Google Sheets spreadsheet name when creating new backup files. When you set "Active spreadsheet" (see below) to "Create new file on next save", the next time you save it will use the name you specify in this field as the spreadsheet's name.
- Active spreadsheet β Select which Google Sheets spreadsheet you would like to use to sync your data to or restore from. If you select "Create new file on next save", then the next time you save, a new spreadsheet document will be created with the name specified in the "Default spreadsheet name" field.
- Restore β Click this button to restore your data from Google Sheets.
TIP: Once the backup spreadsheet has been created, you can rename it to whatever you want in Google Drive or Sheets. You can keep multiple backups for different purposes and choose which version to restore.
- Disconnect β Click this button to disconnect your Google account. Since you can only have one Google account connected to a subscription plan at a time, when you disconnect an account in one browser, all instances of Lightning Autofill running in other browsers will also be disconnected.
PLUS/PRO: Google Sheets backup/restore (cloud sync) is only available to Plus and Pro subscribers.
Import/Export
Import allows you to load data from a local CSV file. The CSV data structure needs to be arranged in the following format:
- Profiles (columns):
- Profile ID (e.g.,
c1
) - Name β profile name
- Site β profile site filter
- Hotkey β profile hotkey
- Profile ID (e.g.,
- Rules (columns):
- Rule ID (e.g.,
r1
) - Type β field type (
0
for Text,1
for Password,2
for Select,3
for Checkbox/Radio, and4
for JavaScript) - Name β field name
- Value β value to autofill
- Site β rule site filter
- Mode β form fill method (
0
for Safe,1
for Overwrite,2
for Prepend,3
for Append,4
for Wrap,5
for Increment, and6
for Decrement) - Profile β ID of the profile this rule belongs to (empty if it is Unfiled)
- Rule ID (e.g.,
- Settings:
- advanced β list of configurations in the Advanced tab
- exceptions β list of filters in the Exceptions tab
- textclips β list of snippets in the Text Clips tab
- variables β list of variables in the Variables tab
- allhotkey β hotkey to execute All profile
- spreadsheetname β Google Sheets spreadsheet name when creating a new file for cloud sync
- spreadsheetid β Google Sheets spreadsheet ID for cloud sync
- importurl β URL of remote file to import data from
- activecat β "Autofill active profile only" option (
1
to enable and0
to disable) - attributesoff β "Attributes to remove" option (
1
to enable and0
to disable); list of attributes - autocomplete β "Autocomplete trigger character" option (
1
to enable and0
to disable); trigger character - backup β "Back up text fields" option (
1
to enable and0
to disable); minimum characters to back up - badge β "Icon badge" option (
1
to enable and0
to disable) - bisync β "Bi-directional cloud sync" option (
1
to enable and0
to disable) - captchas β "Autofill CAPTCHAs" option (
1
to enable and0
to disable) - closeinfobar β "Auto-close infobar" option (
1
to enable and0
to disable); menu selection (index starting from 0) - debug β "Debug mode" option (
1
to enable and0
to disable) - delay β "Autofill delay" option (
1
to enable and0
to disable); number of seconds to delay - devmodepopup β "Developer mode popup" option (
1
to enable and0
to disable) - expirecats β "Profile expiration" option (
1
to enable and0
to disable) - filtercats β "Filter profiles" option (
1
to enable and0
to disable) - fluid β "Fluid layout" option (
1
to enable and0
to disable) - hidebackup β "Hide backup profiles" option (
1
to enable and0
to disable) - ietextbox β "Import/Export text box" option (
1
to enable and0
to disable) - manual β "Manual mode" option (
1
to enable and0
to disable) - mask β "Mask passwords" option (
1
to enable and0
to disable) - menu β "Context menu" option (
1
to enable and0
to disable); menu selection (index starting from 0) - overwrite β "Overwrite by default" option (
1
to enable and0
to disable) - parselabels β "Parse labels" option (
1
to enable and0
to disable) - randdelay β "Randomize delay" option (
1
to enable and0
to disable) - regexalerts β "Regex warnings" option (
1
to enable and0
to disable) - sitefilters β "Site filters" option (
1
to enable and0
to disable); menu selection (index starting from 0) - skiphidden β "Skip hidden fields" option (
1
to enable and0
to disable) - sound β "Sound effects" option (
1
to enable and0
to disable) - theme β "Theme" option (
1
to enable and0
to disable); menu selection (index starting from 0); background color; foreground color - tooltips β "Tooltips" option (
1
to enable and0
to disable) - turbo β "Turbo mode" option (
1
to enable and0
to disable) - vars β "Expand variables" option (
1
to enable and0
to disable)
Import mode:
- Append β Append profiles, autofill rules, advanced options, exceptions, text clips, and variables in the CSV file to the existing data. This option allows you to import individual sections (e.g.,
### AUTOFILL PROFILES ###
). Note that this mode does not apply to CSV files imported from a URL (see below). - Replace β Replace all data with data imported from the CSV file. Use this option to restore your autofill rules and settings.
Export allows you to save all data to a local CSV file for backup. Once your data is stored in an external file, you can later use the Import feature to restore the data in your current browser or transfer the data to Lightning Autofill in another browser (e.g., Brave, Firefox, Edge).
TIP: If you have a lot of autofill rules you'd like to reorder, then it's faster if you export your settings to a CSV file, reorder the rules in a text editor, and import the data back into Lightning Autofill.
Similarly, if you want to move many rules into different profiles at once, then it's best to do this in a text editor by reassigning their profile IDs (e.g., c1
).
Once you get familiar with the CSV data structure, you can edit your autofill rules and settings in bulk before importing them back into Lightning Autofill.
As an alternative, you can also import data from a remote file by entering the file's URL in the field below the main Import/Export box and clicking Import. The URL needs to point to a plain text file that has the same structure as the exported CSV data. The server hosting this file needs to have the following two response headers:
Access-Control-Allow-Origin: *
Content-Type: text/plain
The first header is to prevent cross-origin errors; the second header ensures that the file is served in plain text format (as opposed to HTML). Here's a sample URL that has rules to autofill the Practice Form:
Available Plans
To get the most out of Lightning Autofill, you should upgrade to the Plus or Pro plan.
FREE |
|
---|---|
Plus $4.99/month |
|
Pro $9.99/month |
|
* A profile is a collection of autofill rules. There is no limit to the number of autofill rules you can have in a profile. The daily limit resets every 12:00 AM midnight local time. You can see your current usage by hovering the mouse cursor over the Lightning Autofill extension icon.
Keyboard Shortcuts
Options β Global
Close modal | Esc |
Options β Form Fields tab (when caret is inside a text box)
Add new rule below | Alt + + |
Navigate rules | β and β |
Move rule up | Alt + β |
Move rule down | Alt + β |
Autocomplete
Cycle through autocomplete entries | β and β |
Search for autocomplete entry | Type any part of the shortcode or full text |
Select autocomplete entry to expand | Enter or Tab |
Exit autocomplete mode | Esc |
Infobar (also known as the wizard)
Open infobar |
Chrome: set shortcut in chrome://extensions/shortcuts Edge: set shortcut in edge://extensions/shortcuts Firefox: how to set shortcut |
Close infobar | Esc |
NOTE: For Mac users, replace the Alt key with β₯.
Frequently Asked Questions
- I don't get itβhow does Lightning Autofill work?
- How come some fields are not being autofilled? For the life of me I can't get this to work!
- How do I auto-click a button?
- How do I randomly select a checkbox from a group of checkboxes?
- How do I wait for a dropdown menu to be populated before autofilling it?
- How do I implement a text spinner, except ensure that each value is used only once on the form?
- Where does Lightning Autofill store its data, and does it send the data anywhere?
- How do I autofill a form that uses divs instead of form tags?
- How do I create an autofill rule using the values from existing rules?
- What does the number on the lightning bolt icon mean?
- How come the extension icon is grayed out sometimes?
- How do I manually create an autofill rule?
- How do I use a JavaScript rule to check every checkbox on the page?
- What if I have multiple sets of data I want to autofill for the same form?
- Can I use jQuery in a JavaScript rule?
- Does Lightning Autofill support automating file uploads?
- Does Lightning Autofill support autofilling CAPTCHA?
- Can I make changes directly in Google Sheets?
- How do I add a delay for a specific rule?
- How do I increment a number in an existing form field?
- What if I need further assistance?
- Can I bookmark the Lightning Autofill Options page?
- What exactly is a "form field" anyway?
- What should I enter in each column of the Form Fields tab?
- Can I reorder the autofill rules?
- Can I duplicate a profile?
- I pressed the hotkey assigned to a profile, but it didn't execute. What's going on?
- What if I want to create an autofill rule for only one specific field?
- Can I disable a specific rule in a profile?
- The text boxes in the Form Fields tab are too smallβcan't you make them any bigger?
- I'm a power user. Are there any keyboard shortcuts?
- Just curious, what technologies did you use to develop Lightning Autofill?
- What's new in this version?
- How can I help translate Lightning Autofill into my local language?
- Is Lightning Autofill open source?
- This extension has saved me a ton of timeβany way I can give back?
- Why do I keep having to reconnect my Google account?
- What's the best way to troubleshoot Lightning Autofill issues?
- The field autofills, but how come I still can't submit the form?
- Is there a way to execute different profiles one after another?
- How do I assign a hotkey to open the Lightning Autofill infobar?
- How come I do not see all my profiles or text clips in the right-click context menu?
- Is it possible to create global rules for addresses?
- How come my cloud sync isn't working?
- Can I sync changes in Google Sheets back to the extension?
- How many PCs can I install this on per subscription?
- I can't pay through Stripeβare there other payment options?
- What happened to the yearly subscriptions?
- How do I activate my subscription?
- I still can't activateβwhat is this "Failed to fetch" error?
- How do I know how many profile executions I have left in the Free plan?
- How do I see my subscription key after it's activated?
- How can I change my email address in Manage Subscription?
- I know how to add profiles, but how do I delete them?
- It says I'm already connected to another Google accountβnow what?
- How do I get an element's XPath?
- Q 1. I don't get itβhow does Lightning Autofill work?
- A The easiest way to see how it works is to go to the practice page and generate some rules:
- Go to the Practice Form.
- Fill out some fields.
- Click the Lightning Autofill icon in the toolbar (if you don't see the icon, then it's most likely hidden, so click the menu icon to get to it).
- Create a new profile to save the rules in if you want to organize them by topic or website (this step is optional).
- Click the Generate Autofill Rules button.
- Q 2. How come some fields are not being autofilled? For the life of me I can't get this to work!
- A The web is like a wildernessβyou never know what you'll encounter. With this said, there are generally two types of forms that can trip up Lightning Autofill:
- Forms that use dynamic field names. The rules generated by the Lightning Autofill infobar should work most of the time, but there are some complex forms where these rules will fail to work because every time you load the page the input elements'
name
attribute values change (e.g., they contain a randomly generated string or timestamp). For example, the first time you use the infobar rules generator thename
attribute for the First Name field is "fname1481162526802", so the generated rule is^fname1481162526802$
; however, the next time you visit the page thename
attribute changes to "fname1481162889085", so of course the rule won't match anymore and hence this field will not get autofilled. In such cases, you'll have to manually tweak the rules generated by the infobar so that they will continue to match. You can either try a shorter, more generic regular expressions (regex) pattern like^fname
, or you can try matching against one of the other supported attributes (see Form Fields) instead of thename
attribute if the values in those attributes don't change. - Forms that rely on elements not supported by Lightning Autofill. Only traditional form elements (
<input>
,<select>
,<textarea>
) are supported by the infobar rules generator; for everything else, you'll have to use JavaScript rules. A good example is this online store. Add a product to cart and proceed to Checkout. The terms & conditions checkbox in the checkout form cannot be autofilled using the rule generated by the infobar. This checkbox is not getting checked because what you click on is not really a checkbox. Try right-clicking on it and selecting "Inspect"βyou should see this highlighted:<ins class="iCheck-helper" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; background: rgb(255, 255, 255); border: 0px; opacity: 0;"></ins>
It's an<ins>
element instead of the usual<input type="checkbox">
form element. To auto-click this, you'll have to use a JavaScript rule. Try this: To understand what this code is doing, enter the line below in the JavaScript Console. To bring up the Console, press F12 to open developer tools and go to the Console tab (or press Ctrl + Shift + J to toggle the Console directly).querySelectorAll()
is a JavaScript method that takes a CSS selector as a parameter and returns a type of list called an array of all elements matching that CSS selector within thedocument
object (basically, everything between<html>
and</html>
). In this case, it returns an array of elements matching.iCheck-helper
, or class name "iCheck-helper". The[1]
after this method is the index number. You can access items in the array by referencing an item's index number within the array. The thing to remember with JavaScript arrays is that index numbers start at zero, not one. Since the terms & conditions checkbox is the second item in the array, you use index number 1 to reference it. The last part of the statement (click()
) is the meat of the actionβit triggers a click on that element.
When you create a JavaScript rule, the most important thing is to figure out what CSS selector to use to "select" an element so that you can act upon it (e.g.,element.click()
to simulate a mouse click orelement.value = 'something'
to autofill). In addition toquerySelectorAll()
, you can also usequerySelector()
to return the first matching element, which is simpler since the index number is no longer required. Here are some online references in case you want to dive deeper:
- Forms that use dynamic field names. The rules generated by the Lightning Autofill infobar should work most of the time, but there are some complex forms where these rules will fail to work because every time you load the page the input elements'
- Q 3. How do I auto-click a button?
- A You can use a JavaScript rule to do this among many other things (e.g., automatically submit a form after autofilling). Right-click on the button you want to auto-click and select "Inspect". You should see the underlying HTML code for that button highlighted in the Elements panel. Below is the code that you would enter in the Value field for various types of buttons.
<input type="submit" value="Apply">
<button id="continue-btn">Continue</button>
β OR β Ifclick()
is not working for you, then you can manually trigger a 'click' event like this: As an alternative, you can add this JavaScript rule anywhere in the profile to auto-submit the form (JavaScript rules are always executed last):
Type = JavaScript
Value = Also be sure to check out cuddlycows' excellent How-To auto-submit a form tutorial. - Q 4. How do I randomly select a checkbox from a group of checkboxes?
- A To randomly select a checkbox from a group of checkboxes, you can use a JavaScript rule. To give you an idea, here's a rule that will randomly select one of the four checkboxes on this test page:
Type = JavaScript
Value = To randomly toggle a checkbox on or off, use the "?" value, e.g.:
Type = Checkbox/Radio
Name =^subscribe$
Value =?
- Q 5. How do I wait for a dropdown menu to be populated before autofilling it?
- A A common scenario for this is when you want to select a state dropdown menu, but it's only populated when you select Country = US. If you use a standard autofill rule for state, then Lightning Autofill will try to execute it before the state dropdown menu is fully populated with all the states, so the rule will likely fail. To work around this, you'll have to use a JavaScript rule. Let's say you have this HTML code:
<select name="country"> ... <option value="US">United States</option> ... </select> <select name="state"> <!-- Initial state is empty --> </select>
Your rule would look something like this:
Type = JavaScript
Value = The same concept applies for fields that are created dynamically (i.e., don't exist when the page first loads). For example, here's how you would autofill the comment box on YouTube: - Q 6. How do I implement a text spinner, except ensure that each value is used only once on the form?
- A Let's say you have the following input fields and you want to fill them with the values "red", "green" and "blue", where each value is only used once:
<input name="color1"> <input name="color2"> <input name="color3">
Starting from Lightning Autofill v10, you can use the new shrinking text spinner variable to accomplish this. Here's what the rule would look like:
Type = Text
Name =^color[1-3]$
Value ={(red|green|blue)}
As an alternative, you can also use a JavaScript rule. Your rule would look something like this:
Type = JavaScript
Value = - Q 7. Where does Lightning Autofill store its data, and does it send the data anywhere?
- A Lightning Autofill stores its data using the browser's
chrome.storage
API. Lightning Autofill does not and will never send your data anywhere. You can verify this by monitoring the Network tab. In fact, Lightning Autofill doesn't even track you using Google Analytics or anything else. Note that even though your data is not sent anywhere, you should still NOT use Lightning Autofill to store sensitive or confidential information since the storage area is NOT encrypted, which means anybody with access to your computer will be able to see whatever you store in Lightning Autofill if they know where to look.
Users on the Plus or Pro plan have the option to back up their data to Google Sheets, in which case the data is also saved in a Sheets spreadsheet called "Lightning Autofill backup". Note that if you delete this spreadsheet, Lightning Autofill will continue to sync to it since the document will live in the trash for 30 days. A new spreadsheet will be created automatically at the next sync once the existing backup spreadsheet is permanently deleted. - Q 8. How do I autofill a form that uses divs instead of form tags?
- A Instead of using traditional form elements (
input
,select
,textarea
), more and more modern forms use generic elements likediv
andspan
to make the UI look pretty, but behind the scenes there is likely JavaScript that stores the selected values in hidden input fields (a good example is Google Forms). Since these "rich" forms are tricky to reliably autofill, I recommend either of the methods below to manually create the rules. Between the infobar-generated rules and the course of action outlined here, you should be able to autofill the vast majority of forms; however, you never know with the internet, so your mileage may vary.
Method 1: Target the form directly. Since the main purpose of a form is to submit information back to the server, you can short-circuit the input selection process and set the relevant form values directly. Chrome comes with a great tool to monitor what information is sent when you submit a form, which you can use to craft your autofill rules. Here are the steps:- Go to the page with the form you want to autofill.
- Open Developer Tools (F12 or Ctrl + Shift + I).
- Go to the Network tab.
- Ensure the "Preserve log" option is checked.
- Look for the
<form>
element containing the fields you want to autofill and make a note of theaction
attribute value. This is the server script that handles the form data. Also make a note of the form'sid
orname
attribute value, which you'll need to submit the form later on (last step). A quick way to find the correct<form>
element is to right-click on a field and select "Inspect", then follow the breadcrumbs at the bottom of the Elements tab from right to left until you get to "form". - Fill out the form with the values you want and submit it.
- In the Network tab, click the link to the form
action
script from step 5. If you see multiple rows with the same name, then click on the one with "document" under the Type column. - Go to "Query String Parameters" at the bottom (expand it if it's collapsed) and make a note of all the parameters. For example, if I were to search for "autofill" on Google, I would see something like this after submitting the form:
safe: off site: source: hp q: autofill oq: autofill gs_l: hp.3..0i20k1l2j0j0i131k1j0l6.13514.14205.0.24666.11.9.0.0.0.0.511.1305.2-2j1j0j1.4.0....0...1c.1.64.hp..7.1.302.0.B15ZjP-S264
The text to the left of the colon is the parameter key, and it maps to the input'sname
attribute; the text to the right of the colon is the parameter value, and it maps to the input'svalue
attribute. A parameter refers to this key-value pair. These parameters are sent to the server when you submit the form, and they're the only things that matter as far as Lightning Autofill is concerned. Once you know what the parameters should be, then you are ready for the next step... - Create autofill rules for the fields from step 8 (assuming these are hidden inputs, which are equivalent to text inputs). Using the same Google search example, the rules would look like this:
Type = Text
Name =^q$
Value =autofill
Type = Text
Name =^oq$
Value =autofill
As you can see, you can usually get away with assigning a value for only the relevant fields, but you should experiment to see what works. If the rules don't work, then there's a chance that Lightning Autofill is executing them too fast, in which case you can add a delay by using a JavaScript rule, e.g.:
Type = JavaScript
Value = This tells Lightning Autofill to wait 2000 milliseconds (2 seconds) before executing the JavaScript code. If you want to increase the delay, then change2000
to a larger number.
Type = JavaScript
Value = - Q 9. How do I create an autofill rule using the values from existing rules?
- A First, enable variables by going to Lightning Autofill Options / Settings tab and make sure the "Expand variables" option is checked. With variable expansion enabled, you should see a little gray box with some white text inside in the upper right corner of every field on the Form Fields tab. This is the variable name, or field reference. In order to use the value from that field, you refer to its field reference in your rule. For example, if you have a rule for First Name with the field reference
v1
and a rule for Last Name with the field referencev2
, and you want to autofill "[First Name] [Last Name]", then create a rule with this as the value:{v1} {v2}
. For more information on variables, please refer to the Settings section. - Q 10. What does the number on the lightning bolt icon mean?
- A This number, also called an icon badge, represents the number of rules that were executed on the current page. Sometimes this number can be higher than you expected because Lightning Autofill runs in all iframes in addition to the main page, so the same rule may be executed in iframes as well.
- Q 11. How come the extension icon is grayed out sometimes?
- A The lightning bolt icon is grayed out when there are no fields to autofill, or when the page title or URL matches something on the Exceptions list. The icon will light up when the following elements are detected:
<input>
,<select>
,<textarea>
,<iframe>
(generally used by rich text editors), and elements that have thecontenteditable="true"
attribute. The icon is also grayed out when the extension auto-updates in the background; if this happens on a page with form fields, then you should reload the page for proper autofilling operation. - Q 12. How do I manually create an autofill rule?
- A Follow these steps:
- Right-click on the field you'd like to autofill and select "Inspect". This will bring up the field's HTML code. Most form fields should have a
name
orid
attribute; the value in this attribute will act as a unique identifier for the autofill rule. See the Form Fields section for a full list of attributes you can match against. - Go to Lightning Autofill Options. From the Form Fields tab, click the button. This will add a new row to the rules table.
- Here's what you would enter for each column in the row:
- Type β the type of field it is. This should be self-explanatory. The JavaScript type allows you to automatically execute JavaScript code on page load.
- Name β a unique identifier for the field to autofill. Use the attribute value from step 1. Note that Lightning Autofill does a partial match, so if you enter "email" and there's another field with
name="email2"
, then this rule will autofill both fields. To prevent this, enter^email$
to force an exact match. - Value β the value to autofill the field with.
- Site β the page's URL or title. This acts as a site filter to trigger the autofill, so it's highly recommended that you enter something or else Lightning Autofill will blindly autofill every field of the selected type.
- Mode β leave this on Safe. If the field contains a default value that you'd like to overwrite, then change the mode to Overwrite.
- The most important step: click Save.
- Right-click on the field you'd like to autofill and select "Inspect". This will bring up the field's HTML code. Most form fields should have a
- Q 13. How do I use a JavaScript rule to check every checkbox on the page?
- A Actually, you don't even have to use a JavaScript rule for thisβyou can simply use a Checkbox/Radio rule, leave the Name field blank, and enter
1
for the Value field to check every checkbox on the page. However, if you still want to use a JavaScript rule, then you can use this code: This will click every checkbox, so if one is already checked then it will be unchecked. If you want to have every checkbox checked regardless of its state, then enter this instead: - Q 14. What if I have multiple sets of data I want to autofill for the same form?
- A Yes, the Profiles feature is great way to select which set of data to fill the form with. You can create a profile for each set of data. You may also want to enable manual mode (Settings tab) for this purpose. Now you'll be able to manually execute all the rules in a profile from the right-click context menu (Lightning Autofill / Execute profile) or by pressing the assigned hotkey.
- Q 15. Can I use jQuery in a JavaScript rule?
- A Lightning Autofill versions prior to v12 had a special function called
injectJquery()
to inject the jQuery library, but that has since been removed since vanilla JavaScript can now do most of what jQuery was being used for (e.g.,querySelector()
,querySelectorAll()
). - Q 16. Does Lightning Autofill support automating file uploads?
- A No, for security reasons Chrome doesn't allow autofilling of
<input type="file">
elements. The best solution for this is to use a screen recorder or macro utility like AutoHotkey. - Q 17. Does Lightning Autofill support autofilling CAPTCHA?
- A It depends on the type of CAPTCHA. To my knowledge there is currently no way to extract text from a CAPTCHA image with 100% accuracy using JavaScript. Please post in the Discord community if you have a good solution for this. However, it is possible to auto-check the "I'm not a robot" reCAPTCHA. For example, here's a rule that works on this reCAPTCHA demo:
Type = JavaScript
Value = - Q 18. Can I make changes directly in Google Sheets?
- A No, any edits you make in Google Sheets will not sync back to Lightning Autofill and will be overwritten whenever you make changes in Lightning Autofill Options. There is currently no way for Google Sheets to communicate with browser extensions, so the sync happens in only one direction: from Lightning Autofill to Google Sheets.
- Q 19. How do I add a delay for a specific rule?
- A You can set three levels of delay in Lightning Autofill:
- Global delay β this affects all rules in all profiles. Set this in the Settings tab.
- Profile-level delay β this affects all rules in the specified profile. For example, to set a 2-second delay for all rules in profile c1, enter this in the Advanced tab:
c1: delay=2
- Rule-level delay β this affects only the specified rule. For example, to set a 2-second delay for rule r1, enter this in the Advanced tab:
r1: delay=2
- Q 20. How do I increment a number in an existing form field?
- A Let's say you want to increment the number in
<input name="count">
. You would create a JavaScript rule and enter this code:
Type = JavaScript
Value = - Q 21. What if I need further assistance?
- A If you need further assistance, please visit the official Lightning Autofill support community to start a new discussion or join an existing one. The old Google Group also contains a wealth of information, although it is no longer maintained. To get acquainted with Lightning Autofill, see what the rules look like for the Practice Form by automatically generating them using the infobar as outlined in the answer to question 1.
- Q 22. Can I bookmark the Lightning Autofill Options page?
- A Yes, you can bookmark the Options page for quick access. For example, this is the URL for the Options page in Google Chrome:
chrome-extension://nlmmgnhgdeffjkdckmikfpnddkbbfkkk/options.html
The Options page can also be accessed through the right-click context menu if the setting is enabled in the Settings tab, or by right-clicking on the extension icon (lightning bolt). - Q 23. What exactly is a "form field" anyway?
- A A form field, also known as a form control or form element, is used to submit data from the client (your browser) to the server. It can have the following HTML tags:
<input>
,<textarea>
,<select>
. Though not technically a form field, Lightning Autofill also supports WYSIWYG edit boxes that use the<iframe>
tag. - Q 24. What should I enter in each column of the Form Fields tab?
- A Move the mouse pointer over the icon in the column header for some guidance. A detailed description is also available by clicking the Help button.
- Q 25. Can I reorder the autofill rules?
- A Yes, you can easily reorder any rule by dragging the icon on the right. If you are currently editing inside a text box, then you can press Alt + β to move that rule up or Alt + β to move it down.
- Q 26. Can I duplicate a profile?
- A Yes, you can do this by following these instructions:
- Create a new empty profile in Options (this is the profile you want to duplicate to).
- Export the data to a CSV file under the Sync tab.
- Open the CSV file in a text editor like Notepad.
- Copy the rows of the profile you want to duplicate and paste it immediately above
### AUTOFILL SETTINGS ###
. - In the newly pasted rows, change the profile ID to the ID of the profile you just created (this can be found under the
### AUTOFILL PROFILES ###
section). - Import the CSV data back into Lightning Autofill.
- Q 27. I pressed the hotkey assigned to a profile, but it didn't execute. What's going on?
- A Chances are very likely that this hotkey is already used by Chrome, another Chrome extension, another program, or possibly your operating system. Try setting another hotkey for that profile.
- Q 28. What if I want to create an autofill rule for only one specific field?
- A You can generate an autofill rule for one text field by right-clicking inside this field and selecting "Add rule for this field..." in the Lightning Autofill context menu.
- Q 29. Can I disable a specific rule in a profile?
- A The quickest way to disable a rule is to set its site filter to something that will never match, like
###
. - Q 30. The text boxes in the Form Fields tab are too smallβcan't you make them any bigger?
- A You can resize a text box by dragging the gripper (e.g., in Chrome) at the bottom right corner of the box. The new size will be preserved until you reload the page. You can also click the Edit button to edit the value in a code editor (very useful for JavaScript rules).
- Q 31. I'm a power user. Are there any keyboard shortcuts?
- A Yes, see the Keyboard Shortcuts section.
- Q 32. Just curious, what technologies did you use to develop Lightning Autofill?
- A Mainly HTML, CSS, and JavaScript. HTML5: data attributes for various functionalities on the Options page, the
<audio>
tag for sound effects, and range input for the slider control. CSS3:border-radius
for the rounded corners,box-shadow
for the gradient shadows, flexbox for the modal dialog positioning, and transitions/transforms for the animations. Microsoft Ajax Minifier was used to keep the extension fast and light, and no JavaScript frameworks were used to further reduce the weight. All JavaScript performance testing was done using jsPerf. All coding was initially done in Notepad2, then later Notepad++. - Q 33. What's new in this version?
- A Click on the version number in the upper right corner to see the changelog.
- Q 34. How can I help translate Lightning Autofill into my local language?
- A We stopped offering localizations since v12.5.0 because modern browsers have built-in translations. Here's an example of the Options page translated to Portuguese in Microsoft Edge:
- Q 35. Is Lightning Autofill open source?
- A The Lightning Autofill extension is currently closed source.
- Q 36. This extension has saved me a ton of timeβany way I can give back?
- A I have poured countless hours into Lightning Autofill over the years, which began life in 2010 as an assistance tool for my disabled computer students and eventually evolved into the all-purpose extension that you see now. Since I'm just a one-person shop doing this in my spare time, anything that you can contribute would be a blessing whether it be posting how-to tutorials or answering questions in the support community. If you find Lightning Autofill useful and want to support its ongoing development, then please subscribe. Thank you so much for your support. π
- Q 37. Why do I keep having to reconnect my Google account?
- A If you're using Microsoft Edge or Mozilla Firefox, you will be prompted to reconnect to your Google account every hour. This is a technical limitation of these browsers because they currently do not support the ability to automatically refresh authorization tokens whenever they expire. In Google Chrome, "you do not need to manage access tokens; the libraries automatically retrieve the credential, exchange it for an access token, and refresh the access token as needed" (source).
- Q 38. What's the best way to troubleshoot Lightning Autofill issues?
- A To help me help you faster, it would be best if you could provide me with enough information to reproduce the issue consistently because the first step in resolving the issue is to be able to reproduce it. Please provide me with the following:
- Autofill rules you're having problems with β you can export the data and either email it to me privately or post it in the support group. If the rules contain private information, then remember to remove the sensitive bits or replace them with dummy data.
- URL of the form you're having problems with β if the page requires a login or is behind a private portal, then the next best thing is to save the page as HTML and provide the complete HTML code. You can save any web page by pressing Ctrl + S and selecting "Webpage, Complete". If you're having a problem with only one specific field, then you can provide me with the HTML code for that field by right-clicking on it and selecting "Inspect" to bring up the Elements panel. This element should already be highlighted for you; to grab the HTML code, right-click on the highlighted element and select Copy / Copy outerHTML.
- Error logs (if any) β Lightning Autofill can throw errors in two locations:
- Background page β to see if there are errors here, go to the extensions page (e.g., chrome://extensions in Google Chrome) and click on "service worker" next to "Inspect views" under Lightning Autofill (in Firefox, click the Inspect button). A new window should pop up; go to the Console tab. Make sure the dropdown menu to the right of the Filter input is set to "Default levels". Any errors should be printed in red text in the console.
- Content script β to see if there are errors here, go to the form you're having problems with and bring up the JavaScript console by pressing F12 and clicking on the Console tab. Make sure the dropdown menu to the right of the Filter input is set to "Default levels". Any errors should be printed in red text in the console.
- Q 39. The field autofills, but how come I still can't submit the form?
- A Some sites use JavaScript validation to ensure that the user manually types the text into the field. Every site is different, but you can usually fool the validation by using
dispatchEvent()
to simulate user input. Example:
Type = JavaScript
Value = If theinput
event doesn't work, then try other keyboard events such askeyup
,keydown
, andkeypress
. I once came across a form that required a mouse click on the field (mousedown
event) in order to properly validate the user input. - Q 40. Is there a way to execute different profiles one after another?
- A Yes, starting with v9.0.0 you can execute profiles from a JavaScript rule. This way you can chain a bunch of profiles together by having the first profile execute; the first profile contains a JavaScript rule that executes the second profile, and so on. Here is the function you can use to execute a profile:
Autofill('profile ID', delay)
.
To execute profile c1 (the profile ID is displayed in the tooltip when you hover over the profiles dropdown menu): To execute the "All" profile: To execute the "Unfiled" profile after a 1.5-second delay (1500 ms): You can even chain multiple commands together, like this:NOTE: This function was removed in Lightning Autofill v12 because of the way MV3 extensions work. For improved security in the new MV3 world, all user JavaScript codes are executed in a different "context" than other scripts that exist on the web page, so they have no access to Lightning Autofill's
Autofill()
function. As a replacement, starting with v12.18.0 you can use the AUTOFILL action to execute profiles. - Q 41. How do I assign a hotkey to open the Lightning Autofill infobar?
- A To assign a global hotkey to activate the Lightning Autofill infobar:
- Chrome β go to chrome://extensions/shortcuts and enter the hotkey for Lightning Autofill.
- Edge β go to edge://extensions/shortcuts and enter the hotkey for Lightning Autofill.
- Firefox β go to about:addons, click the gear icon, select "Manage Extension Shortcuts", and enter the hotkey for Lightning Autofill.
- Q 42. How come I do not see all my profiles or text clips in the right-click context menu?
- A This can occur in Chrome when you have too many profiles or text clips. Chrome is limited to a total of 1000 context menu items (inclusive of the parent Lightning Autofill menu). This means, for example, if you have 1000 profiles set up, you would only see 997 profiles (the other three are used by the "Lightning Autofill", "Add rules for this page", and "Execute profile" menu items), and Option would not be displayed in the context menu.
- Q 43. Is it possible to create global rules for addresses?
- A While there is no one set of rules that can autofill 100% of the address forms on the internet, you can leverage the
autocomplete
attribute to create rules that would autofill a large number for address forms. For example, here's a generic rule to autofill the first name:
Type = Text
Name =given-name
Value =Bob
- Q 44. How come my cloud sync isn't working?
- A The most common reason is because when you connected your Google account, you didn't give Lightning Autofill the proper permissions. Try disconnecting, then reconnecting and ensure you check the appropriate box when prompted.
- Q 45. Can I sync changes in Google Sheets back to the extension?
- A Yes, as of version 12.11.0, you can enable the "Bi-directional cloud sync" option in Lightning Autofill Options / Settings tab under the Experimental section.
- Q 46. How many PCs can I install this on per subscription?
- A We are currently not enforcing a limit on the number of computers you install Lightning Autofill on for each subscription plan. However, note that you can only be connected to one Google account at a time across all browsers on all devices for the cloud sync feature.
- Q 47. I can't pay through Stripeβare there other payment options?
- A If Stripe is not supported in your country, then we can accept payment through cryptocurrency, PayPal, or Wise (formerly TransferWise). However, you'll need to pay for the number of months in advance, and your subscription will automatically cancel after the paid number of months. This means you'll have to manually renew your subscription when it expires since there is no Stripe integration. Please go to Alternative Payment Methods if you want to proceed with this.
- Q 48. What happened to the yearly subscriptions?
- A As we announced in the February 10, 2024 News update, yearly subscription plans are no longer available. Too many people forgot that they had subscribed the year before and reported the credit card renewal charge as fraudulent, which was a big headache for us. The latest plans are listed here:
Lightning Autofill Plans : Subscribe - Q 49. How do I activate my subscription?
- A Here's how to activate your subscription plan:
- Open Lightning Autofill Options and go to the Settings tab.
- Enter the first part of the invoice number in the "Invoice number" field under the Subscription section. The invoice number can be found in the Stripe order confirmation email. For example, if your invoice number is ABCD1234-001, then you would enter ABCD1234 in the invoice number field. Note that the invoice number is NOT the receipt number (which looks like #1234-1234), so be sure you are using the invoice number to activate.
- Click the Activate button. After a few seconds, it should change to "Activated".
- Q 50. I still can't activateβwhat is this "Failed to fetch" error?
- A If you still cannot activate your subscription plan because of the "Failed to fetch" error, then it's likely that your internet service provider or your country is blocking access to the subscription validation server on Cloudflare. Sorry, this is out of our control and there's not much you can do about it aside from using a VPN service. We recommend Windscribe, which is our favorite VPN service with a generous free data quota. If you sign up using the link below, then we both get an additional 1 GB of data! π₯³
https://windscribe.com/yo/5irboecv - Q 51. How do I know how many profile executions I have left in the Free plan?
- A You can see your remaining executions for the day by hovering the mouse cursor over the Lightning Autofill extension icon, like this:
- Q 52. How do I see my subscription key after it's activated?
- A You can see your subscription key by double-clicking into the invoice number field.
- Q 53. How can I change my email address in Manage Subscription?
- A For security purposes, Stripe currently doesn't allow you to change your email address in the Manage Subscription customer portal. To update your email address, please send a request to support@tohodo.com.
- Q 54. I know how to add profiles, but how do I delete them?
- A You can delete profiles from the Manage Profiles dialog (Lightning Autofill Options / Form Fields tab / Profiles dropdown menu / Manage Profiles). This dialog also allows you to add, rename, manually reorder, sort, and duplicate profiles.
- Q 55. It says I'm already connected to another Google accountβnow what?
- A Even though you can install Lightning Autofill on as many PCs as you want, you can only be connected to one Google account at a time across all instances of the extension. If you're already connected to one account and try to connect to a different account in another browser, you will get this error. To resolve this, you will first need to disconnect from the other account. Please follow these steps to disconnect the other account:
- Go to Lightning Autofill Options / Sync tab.
- Click the Connect button.
- Select the Google account mentioned in the error message.
- Once you're connected, click the Disconnect button.
- Click the Connect button again.
- Select the Google account you'd like to use.
- Q 56. How do I get an element's XPath?
- A Here's how to get an element's XPath:
- Right-click on the element and select "Inspect".
- Right-click on the element's HTML code in the Elements panel and select "Copy" / "Copy XPath" or "Copy full XPath" (the wording may be different depending on which browser you're using).
Origin Story
What most people don't know is that Lightning Autofill started life with a very different purpose than the automation tool they're used to today: as an accessibility plug-in to help people with disabilities be more productive on the computer. From 2008β2010 I did service work at a Swiss NGO called Maison Chance. One of my primary responsibilities as a web design teacher was to ensure that my 23 students were proficient enough at using the keyboard and mouse to be able to land a job so that they can be financially independant. Most of my students had difficulty doing things that we take for granted, such as using their fingers or having enough motor functions to operate the mouse. I built the original Lightning Autofill v1 in order to facilitate the rudimentary data entry that I saw them struggling with in the classroom every day.
The goal was for my students to identify where the repititions and boilerplate content were in their assignments, then spend all the time they needed to write the autofill rules that would do the work for them automatically on page load. For the most part, this turned out to be wildly successful. There was that initial one-time time investment to painstakingly input the rules, but after that my students' productivity literally shot up 200β500%! Before my two-year contract was over, I managed to instill enough confidence and skills in my students to get them all hired. Depending on the severity of their conditions, the jobs ranged from basic web design (Joomla admin) and Photoshop work to data entry (something Lightning Autofill is particularly good at).
In the beginning I would go to each computer in the classroom and manually install Lightning Autofill locally. As I started adding more and more features to it, updating Lightning Autofill became quite a chore, so that's when I decided to try uploading it to the Chrome Web Store (or whatever it was called in 2010). This saved me so much time as every time I published an update, it would roll out to all the computers in the classroom automatically. The valuable time that I got back I would put into creating more interesting curriculums for my beloved studentsβa win-win. Over the years, long after I ended my service work, Lightning Autofill sort of took on a life of its own as more and more people outside of my classroom started installing it. Before I knew it, there was a bona-fide community built around Lightning Autofill, and the creative things that people do with it every day continue to blow my mind. π€―
This is where it all began...
Credits
The following packages are used in Lightning Autofill:
- Code editor library by FIameCaster + Prism by Lea Verou (and others) β This powers the lightweight code editor you use when you click the Edit button in the Value field.
- Fading JavaScript Tooltips 2kb by Michael Leigeber β This is responsible for the pretty tooltips you see when you hover over in the Form Fields tab.
- Marked by Christopher Jeffrey β This is used to parse some content in Markdown format and render it as HTML.
- TableDnD by Denis Howlett (ported to vanilla JavaScript) β This allows you to reorder rules in the Form Fields tab by simply dragging them up and down.