• Resolved supersvetodiod

    (@supersvetodiod)


    Good afternoon!
    The function is implemented that with a certain result, a certain picture appears.
    How can I implement to display text with a hyperlink.
    As an example, if field1==2, then the text “For more complete information, you need to go to the site “https\\…” should be displayed

Viewing 1 replies (of 1 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @supersvetodiod

    Your equation is too general. However, I’ll try to describe the process with a hypothetical example.

    Assuming you have the equation fieldname1+fieldname2, and you want to include a link in the form when the equation’s result is equal to 2:

    1. Insert an “HTML Content” field in the form with a div tag where insert the shortcode:

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

    2. And then, edit the equation in the calculated field as follows:

    (function(){
    var result = fieldname1+fieldname2;
    if(result == 2)
    {
    jQuery('.link-here').html('<a href="https://www.yourwebsite.com/page-a">Click Here</a>');
    }
    return result;
    })()

    In the same way, I inserted a link tag, you can use any other tag, like an img tag.

    Best regards.

Viewing 1 replies (of 1 total)
  • The topic ‘text with a hyperlink’ is closed to new replies.