Set Element Attribute in Data Design
Last updated
Last updated
Set Element Attribute in Data Design
is a that allows you to set the value of any in elements that were generated using the block and dynamically added to the page or form.
The block consists of the following (from top to bottom):
The next image shows an example of multiple element selection where the ID and ID2 values are not provided.
The behavior of the block is similar to the block, with some important differences:
Works only with elements generated using block that are dynamically added.
Element Selection: You can only choose an element placed inside the selected element.
Attribute: that accepts a value representing the to set or change the value of.
Data Design: to choose the element whose element you want to target.
Element: to choose the element, within the selected , you want to set the attribute of.
ID: Optional that accepts a value representing the unique value that was provided to the block. See below for more details.
ID2: Optional that accepts a value representing the secondary identifier that can be used to identify the desired element. See below for more details.
Data: that accepts the value for the attribute being set (of type )
The behavior of this block depends on the ID and ID2 and is detailed below:
ID and ID2 not provided: Operate on the selected element for all generated instances of the same element.
ID2 provided and ID not provided: Operate on the selected element for all generated instances of the same element with the same ID2 value.
ID provided and ID2 not provided: Operate on the selected element for all generated instances of the same 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 element.
ID and ID2 provided: Operate on the selected element for all generated instances of the same element with the same ID and ID2 value.
NOTE: Please refer to the prerequisite information shown before seeing the example.
The image below shows an example in which the element (Company Link) is selected. For this element, the Attribute is set to and the Data value parameter is linked to a block that contains the Zingy website URL.
The above block results in the element (Company Link), for the ID ST100 (Company 1), pointing to the Zingy website.
This will result the attribute of all the elements (in the selected ) having an empty value.