Skip to content
Browser Actions icon Home Browser Actions 2024.0.3 › Actions

Browser Actions › Actions › Set Form Fields From Dictionary (β)

Sets form fields to new values. The fields and their values are specified by a passed-in dictionary, where each dictionary key/value pair is a field denominator and a field value.

Parameters

Browser

The browser to work with.

Selecting "frontmost browser" will only work if the application currently in the foreground is a supported browser.

Only available if Target tab isn’t set to "specific tab".

Type: Browser

Target tab

Specify which tab you want to work with. The option "active tab of frontmost window" will target the currently active tab at the time this action is executed, while "specific tab" will let you target an existing browser tab.

Options:

  • active tab of frontmost window
  • specific tab

Specific browser tab

If Target tab is set to "specific tab", this parameter expects a browser tab reference.

Type: Browser Tab

Dictionary key type

The dictionary keys specify the form fields to set. This option says how the keys should be used when looking up the fields: Do they correspond to the fields' name attributes, or their id attributes, or are they CSS selectors?

Options:

  • elements' name attributes
  • elements' id attributes
  • CSS selectors

Dictionary

Pass in a Shortcuts Dictionary here which represents a list of form fields and the values they should be set to.

The dictionary keys are used as form field descriptors, i.e. either the field's name or id attribute, or a CSS selector, depending on what's selected in Dictionary key type.

The dictionary values are what the form fields' value attributes will be set to. For a text or number field, the value will be inserted as is. For radio buttons, the radio with the specified value is selected. For a checkbox, a value of "1", "checked", "enabled", "on", "true", or "yes" will enable it, anything else will disable it. ("checked" is the canonical value, the rest exist for your convenience.)

Anything other values, e.g. nested dictionaries etc., will be ignored.

Type: Dictionary

Trigger field's change event

Fires the HTMLElement's change event on each field after changing it. (See https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/change_event for more info.)

Type: Boolean (YES/NO)

Submit parent form

Fires the HTMLElement submit event on the last field's parent form. (See https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/submit_event for more info.)

Prerequisites: The field could be found and set, and the parent <form> element exists.

Type: Boolean (YES/NO)

Pause when done

Add a pause before proceeding to the next action in the workflow.

Options:

  • no pause
  • 0.5 secs
  • 1.0 secs
  • 1.5 secs
  • 2.0 secs
  • 2.5 secs
  • 3.0 secs
  • 3.5 secs
  • 4.0 secs

Return Value

Boolean (YES/NO)