• Resolved nateyarbrough

    (@nateyarbrough)


    I’m attempting to display a hyperlink as a result of a calculated field. Here’s the general direction I was trying to go with it but am stuck. Any advice?

    (function(){

    if(fieldname3 > 100) return {DISPLAY HYPERLINK HERE};

    })();

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @nateyarbrough

    The calculated fields use input tags, and the input tags cannot rendering HTML tags, so, the alternative would be determine the link with the calculated field, but display it into another field.

    – Insert a “HTML Content” field jn the form, with a content similar to the following one:

    <div class="result-here"></div>

    – Edit the equation as follows:

    
    (function(){
    var link = '';
    if(fieldname3 > 100) link = '<a href="https://yourwebsite.com">Click Here</a>';
    jQuery('.result-here').html(link);
    })()
    

    – Finally, as the calculated field is being used as auxiliary, you can tick the checkbox in its settings for hiding the field from the public form.

    Best regards.

    Thread Starter nateyarbrough

    (@nateyarbrough)

    Wow, what a fast reply. That worked great! Thank you so much for your help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to Return Hyperlink’ is closed to new replies.