We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36886
    • 5 Posts
    I am using Jot for the first time and have managed to get most of what I need done but am having trouble getting external links to work correctly.

    I have a custom url field in my guestbook form. It is saving the url that is entered and in my code I check if the url field is empty and if not I add <a> tags around the name of the person who posted the comment.

    My code:
    [+phx:if=`[+comment.custom.web+]`:ne=``:then=`<a href="[+comment.custom.web+]" target="_blank">
    		      [+comment.createdby:isnt=`0`:then=`<b>`+][+comment.createdby:userinfo=`username`:ifempty=`[+comment.custom.name:ifempty=`[+jot.guestname+]`:esc+]`+][+comment.createdby:isnt=`0`:then=`</b>`+]
                      </a>`:else=`
                          [+comment.createdby:isnt=`0`:then=`<b>`+][+comment.createdby:userinfo=`username`:ifempty=`[+comment.custom.name:ifempty=`[+jot.guestname+]`:esc+]`+][+comment.createdby:isnt=`0`:then=`</b>`+]
                      `+]	


    If I enter the url as "http://www.google.com" it works fine and dandy. But if I enter the url as "www.google.com" I then get "http://myurl.com/www.google.com" (aka my baseurl and then the url they entered).

    If there some setting I don't have right? Or some extra code I should be adding?
    Thanks for the help.