Is it possible to add a URL hyperlink to a button control ?
6 comments
-
Hi Catherine,
Thanks for posting in our Community!
The answer to this is unfortunately it cannot be done using the Klipfolio Button component.
However, you can make use of the HTML component, and have an HTML button that redirects to your desired URL.
The code could be like this:
<a href='https://www.google.com'>
<button>GO!</button>
</a>
Or like this:
<button onclick="window.location = 'https://www.google.com'">GO!</button>
Hope this helps!
Warm regards,
Joshua
_______________________________
Joshua Cohen-Collier
Technical Support Engineer, Klipfolio -
Hi Catherine,
An alternative to the HTML component (assuming you just want to go to a hyperlink instead of using a Button component to set a variable or co-ordinate other User Input controls and also go to a hyperlink when clicked) is to use the Value Pair component. To do this
- set the Primary Value to the image you want to use as your "button" and Format as Image URL (resize the image as required)
- set the Secondary Value to the link and Format as Hyperlink. To minimize the text displayed, set the font size to XX-Small and use CONCAT to create a short label. For example: CONCAT( "^", "|", "https://www.klipfolio.com" ) displays a small caret (^) that the user will click to go to the hyperlink.
Janice
-
I have created a button as suggested by Josh and added an anchor (ID of another klip) to the hyperlink. Now this works fine.
But this raises a question, is the ID of a klip a constant or dynamic?
regards,
Peter
-
Hi Peter,
Good question.
The ID of a Klip is indeed constant, however if you create a copy of that Klip("Save as Copy" from editor), this copy will have its own new ID, which is also constant.
Warm regards,
Joshua -
Hello Josh,
Got it, ID is a constant... and expected behaviour for duplicates.
nice.. thanks for the confirmation.
-
Peter,
No problem!
Joshua