Component Methods
Components are what make an experience. Using the following methods you can interact with components directly
hideComponents​
Arguments:​
Argument | Type | Description |
---|---|---|
componentList | array of strings - required | Components that should be hidden |
Hide components in the experience dynamically. The method accepts an array of strings. The strings can be either componentId, normalized componentId or component Names
This example will hide the form sign_up_436366175206
, all Direct Upload components, and the component with the name Component Name Given
window.wyng['_WYNG_ID_'].hideComponents([ 'sign_up_436366175206', 'direct_upload', 'Component Name Given' ]);
hideComponent​
Arguments:​
Argument | Type | Description |
---|---|---|
component | string - required | ComponentId or Component Name of Component to be hidden |
Hide a component in the experience dynamically. The method accepts a string. The string can be either componentId, normalized componentId or a component name
This example will hide the form sign_up_436366175206
window.wyng['_WYNG_ID_'].hideComponent('sign_up_436366175206');
revealComponents​
Arguments:​
Argument | Type | Description |
---|---|---|
componentList | array of strings - required | Components that should be hidden |
Reveal components in the experience dynamically. The method accepts an array of strings. The strings can be either componentId, normalized componentId or component Names
This example will reveal the form sign_up_436366175206
, all Direct Upload components, and the component with the name Component Name Given
window.wyng['_WYNG_ID_'].revealComponents([ 'sign_up_436366175206', 'direct_upload', 'Component Name Given' ]);
revealComponent​
Arguments:​
Argument | Type | Description |
---|---|---|
component | string - required | ComponentId or Component Name of Component to be hidden |
Reveal a component in the experience dynamically. The method accepts a string. The string can be either componentId, normalized componentId or a component name
This example will reveal the form sign_up_436366175206
window.wyng['_WYNG_ID_'].revealComponent('sign_up_436366175206');