Set Element Attribute in Data Design

Block Information

Available in: Page Flow

Toolbox Category: Dynamic Content

Block Type: Regular

Set Element Attribute in Data Design is a regular block that allows you to set the value of any HTML attribute in elements that were generated using the Content from Data Design block and dynamically added to the page or form.

The behavior of the block is similar to the Set Element Attribute block, with some important differences:

  • Works only with elements generated using Content from Data Design block that are dynamically added.

  • Element Selection: You can only choose an element placed inside the selected Data Design element.

The block consists of the following (from top to bottom):


ID and ID2 usage

The behavior of this block depends on the ID and ID2 value parameters and is detailed below:

  • ID and ID2 not provided: Operate on the selected element for all generated instances of the same Data Design element.

  • ID2 provided and ID not provided: Operate on the selected element for all generated instances of the same Data Design element with the same ID2 value.

  • ID provided and ID2 not provided: Operate on the selected element for all generated instances of the same Data Design element with the same ID value. Since we recommend the ID value to be unique, this would choose one from all the generated instances of the associated Data Design element.

  • ID and ID2 provided: Operate on the selected element for all generated instances of the same Data Design element with the same ID and ID2 value.


Usage Examples

NOTE: Please refer to the prerequisite information shown here before seeing the example.

The image below shows an example in which the Link element (Company Link) is selected. For this element, the Attribute value parameter is set to href and the Data value parameter is linked to a Text block that contains the Zingy website URL.

The above block results in the Link element (Company Link), for the ID ST100 (Company 1), pointing to the Zingy website.

The next image shows an example of multiple element selection where the ID and ID2 values are not provided.

This will result the href attribute of all the Link elements (in the selected Data Design) having an empty value.

Last updated