• Resolved benspr

    (@benspr)


    Hi,

    I’d like to insert links into my thank you for that direct people to various pages on my site based on a dropdownDS variable they select in the first part of the form.

    Here’s how I’d like the links to look:
    <a href="https://mysite.com/variableOne/">variableTwo</a>

    How can I build a link like that and insert it into an html field using this plugin? I’m using a CSV recordset and I’m happy to put in the values for variableOne and variableTwo into the recordset so they can be tied to the dropdown selection.

    • This topic was modified 7 years, 3 months ago by benspr.
    • This topic was modified 7 years, 3 months ago by benspr.
    • This topic was modified 7 years, 3 months ago by benspr.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello,

    Assuming that the “variable one” is the value submitted by the fieldname1 field and “variable two” the value submitted by the fieldname2 field, into the “thank you page” you should insert the shortcode for the summary with a format similar to the following one:

    [CP_CALCULATED_FIELDS_RESULT]
    <a href="https://mysite.com/<%fieldname1_value%>/"><%fieldname2_value%></a>
    [/CP_CALCULATED_FIELDS_RESULT]

    More information about the possible tags to use in the thank you pages and notification emails in the link below:

    https://cff.dwbooster.com/documentation#special-tags

    Best regards.

    Thread Starter benspr

    (@benspr)

    Thank you. Do those work inside form fields as well? The majority of my calculated form is actually on the thank you page, and these links would be going in html fields within the form.

    Plugin Author codepeople

    (@codepeople)

    Hello,

    The solution in this case would be different. Insert a “HMTL Content” field in the form with the following piece of code as its content:

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

    and then, you can use the following piece of code as the equation associated to a calculated field:

    (function(){
    var link = '<a href="https://mysite.com/'+fieldname1+'/">'+fieldname2+'</a>';
    jQuery('.link-container').html(link);
    })()

    Best regards.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Build and insert a URL in an HTML field based on recordset variable’ is closed to new replies.