External URL

The ExternalURL component is used to allow the user to enter a link with a button that will allow them to easily navigate to or download the file from the link. The button displayed is dependent on what’s specified in the components field definition.

Download link:

External URL Download Link field

Navigate to link:

External URL Navigate to Link field

Component Code

The first section of the code contains the variables that are used by the component. Below are the methods used by the component and their function.

OnParametersSetAsync()

This method is called when the component initializes and anytime the parent component updates. This method is used assign values to the variables.

ValueChanged()

This method called when the value of the textbox changes, it ensures the field is modifiable, performs validation on the input and calls ChangeXML if there are no validation errors.

LinkClicked()

This method is called when the download/GoTo button is selected to record that the link was selected. This is used for analytic purposes.

ChangeXML()

This method is used to create XML that will be saved to the InstanceData of the current instance. The XML will contain the link inputted into the textbox. Below is an example of the XML format that’s saved.

<ExternalURLField>https://www.greatideaz.com/</ExternalURLField>
Updated on December 29, 2022

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support

Leave a Comment