We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 867
    • 241 Posts
    I wonder how is it possible in the user’s listing to show the data from [+form.country+] ?
    (and by mail too) I tried [+view.country+] but got the code of the country, i.E 174 for france.

    Could some one point me in the right direction ?

    Thks in advance.
      • 28033
      • 925 Posts
      Quote from: alchime at Mar 21, 2008, 06:28 AM

      I wonder how is it possible in the user’s listing to show the data from [+form.country+] ?
      (and by mail too) I tried [+view.country+] but got the code of the country, i.E 174 for france.

      Could some one point me in the right direction ?

      Thks in advance.


      Same issue here. AFAIK, there’s no known solution. undecided
        My Snippets
        -> PopUpChunk v1.0
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        The webloginpe.class has a function for converting the numerical ID to the country string. There appear to be two country placeholders, user.country that sets the string and user.country.integer that sets the numerical ID. There is also view.country, which sets the string. Or at least it should; it uses the StringForCountryInt() function. I see from the code that the mail function does not include that information, and the mail is hard-coded instead of using a template, so you would need to hack the class file to include the country in the information mailed.

        Actually, I haven’t spent as much time on understanding this snippet as I would like to since there are so many bugs and patches and workarounds that it is difficult to get a working copy where I won’t be stumbling over already known and patched bugs. I’ve been waiting until an updated version is released to give a better starting point.

        I suppose one of these days I’ll have to install it and work through the forums post-by-post patching as each one is discussed.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 867
          • 241 Posts
          Thanks Sottwel for joining in.

          You wrotte :
          There is also view.country, which sets the string. Or at least it should; it uses the StringForCountryInt() function
          but when i use [+view.country+] in the users listing I got the integer.. (is more urgent then the mail part for me).
          I haven’t find any hack about this one (but as you said there is many upcoming). So in theory that should work ?!

          The snippet is quite nice but i would agree that an update would be great.
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            I’m trying to follow the coding logic and not having much luck. For example, I can’t find where some of the placeholders (form.country, specifically) are set to begin with. I’ll spend some more time on it today; I imagine you would like to get this resolved as quickly as possible.
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 867
              • 241 Posts
              on it today; I imagine you would like to get this resolved as quickly as possible.
              As for everything ;-) but in that case is not that urgent but that would defintively be nice to be able to do it ..
              Thanks again in adavance !
                • 867
                • 241 Posts
                Have you made any progess ? rolleyes
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  No, sorry, I haven’t had a great deal of time to dig lately... tongue
                    Studying MODX in the desert - http://sottwell.com
                    Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                    Join the Slack Community - http://modx.org