Set Element Attribute

Block Information

Available in: Page Flow

Toolbox Category: Html/DOM

Block Type: Regular

Set Element Attribute is a regular block that allows you to set the value of any HTML attribute in elements on a page or form.

The block comes in two modes which are discussed below.

Mode 1

Set Element Attribute (Mode 1)

The Mode 1 version of the Set Element Attribute block consists of (from left to right):

Mode 2

Set Element Attribute (Mode 2)

The Mode 2 version of the Set Element Attribute block consists of (from left to right):


Usage Examples

The image below shows an example of the Mode 1 version where a Link element is selected for which the Attribute input configuration is set to href and the Data value parameter is attached to a Text block containing the Zingy website URL.

Example of Set Element Attribute Mode 1

In the next example we see a Mode 2 version where the Element value parameter is attached to a Text block containing a CSS Selector that selects the same Link element and sets the same attribute: href. This time the Data value parameter is attached to a Variable block for variable named a.

Example of Set Element Attribute Mode 2

Last updated