0

Adding a hyperlink to a button control

Is it possible to add a URL hyperlink to a button control ?

6 comments

  • 0
    Avatar
    Josh Cohen-Collier

    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

  • 0
    Avatar
    Janice Janczyn

    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

  • 0
    Avatar
    Peter Vermeulen

    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

  • 0
    Avatar
    Josh Cohen-Collier

    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

  • 0
    Avatar
    CENTAGON BV Admin

    Hello Josh,

    Got it, ID is a constant... and expected behaviour for duplicates.

     

    nice.. thanks for the confirmation.

  • 0
    Avatar
    Josh Cohen-Collier

    Peter,

    No problem!

    Joshua

Please sign in to leave a comment.