Skip to main content

Component Methods

Components are what make an experience. Using the following methods you can interact with components directly

hideComponents

Arguments:

ArgumentTypeDescription
componentListarray of strings - requiredComponents 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:

ArgumentTypeDescription
componentstring - requiredComponentId 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:

ArgumentTypeDescription
componentListarray of strings - requiredComponents 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:

ArgumentTypeDescription
componentstring - requiredComponentId 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');