We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7923
    • 4,213 Posts
    Try with a snippet call:

    [[Jot? &subscribe=`0` &pagination=`10` &customfields=`where,status,url,name,email` &tplForm=`SVN_newBug` &tplComments=`SVN_posts`]]

    The name and email are default values for custom fields and if you want to add more, you need to define those too if you are using them in your templates.


      "He can have a lollipop any time he wants to. That's what it means to be a programmer."
      • 3493
      • 66 Posts
      Ah, I see... Well, that didn’t do the trick either, but I’ll try to rebuild the form from scratch now, to see if that helps.
      I may be "code-blinded", which makes the error too obvious to be noticed tongue

      Thanks for your effort anyways, though, doze smiley
        • 32712
        • 8 Posts
        Quote from: bkvernst at Mar 23, 2007, 01:17 PM

        Thanks, but I got that part grin
        In general, my question is:
        How do I put a custom field in the form, and how do I display it in the posts? Is there a special name I have to tag the input field / display variable with?

        bk, i was able to take a user provided url from my form and make the users’ names create a link to that url if one was supplied.
        [+comment.custom.url:if=`[+comment.custom.url+]`:isnt=`0`:then=`<a href="[+comment.custom.url+]" title="Site: [+comment.custom.name+]">`+]user name[+comment.custom.url:if=`[+comment.custom.url+]`:isnt=`0`:then=`</a>`+]
        


        from what i understand, the phx part just calls the comment ([+comment.]) form in the Jot snippet with the custom ([+comment.custom]) field of a name url ([+comment.custom.url+]).

        and all this statement checks for is if the url field of the form is empty or not. if it isn’t empty, then it inserts an anchor tag before and closes the anchor after the commenters’ name.
          • 16472
          • 1 Posts


          bk, i was able to take a user provided url from my form and make the users’ names create a link to that url if one was supplied.


          Sorry to hijack bkvernst’s thread, but you posted exactly what I’ve been looking for quite some time, wtdtan. I was looking for a way to link a provided url in the user name, or the email address in its absence. You code worked like a charm, but I can’t figure out how to replace it with the email address when the url field is left blank. As it is now, it displays the url of the article being read. Example.

          After applying your code to my template it looks like this

          [+comment.custom.url:if=`[+comment.custom.url+]`:isnt=`0`:then=`<a href="[+comment.custom.url+]" title="[+comment.custom.url+]" 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>`+][+comment.custom.url:if=`[+comment.custom.url+]`:isnt=`0`:then=`</a>`+]
          


          I’ve tried with ":else", or ":is`0`:then=" to add this

          `<a href=mailto:[+comment.custom.email+] title="Email: [+comment.custom.email+]" target=blank>`


          but since I’m not really familiar with the syntaxis, at best I get both displayed with jumbled code, when I really want the email address if there isn’t a url available.

          Any help is appreciated.

          Thanks

          --Kurenai