We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10989
    • 29 Posts
    Sure:

    <form action="" method="post">
    
      <p style="margin-left: 0.1em; margin-right: 0.1em;">Enter your email address below to keep up to date with the campaign.<br>
      <input name="email" class="friendEmail" type="text">
      <input name="op" value="set" type="hidden"><br>
      </p><div style="text-align: left; padding-left: 2.75em; padding-right: 2.75em; margin-left: auto; margin-right: auto; font-size: 0.8em;">
    
      <input name="option" value="subscribe" checked="checked" type="radio">Subscribe<br>
      <input name="option" value="unsubscribe" type="radio">Unsubscribe <br>
      </div>
      <input value="Submit" type="submit">
    
      
      </form>
    


    I hacked the snippet to output the form more to my liking (and to try to get rid of the mystery characters), hence the non standard HTML output. Before and after the form is the opening and closing tags for a container div which is part of the site template I’m using and not output by the snippet.
      • 10989
      • 29 Posts
      I updated to 0.9.5 and the problem disappeared huh grin
        • 27166
        • 58 Posts
        Hi,

        seem to have installed the module ok (on 0.9.5) however not sure I’ve got the ID right. In the top of the module I have changed the line as I thought I was supposed to -

        Ported to MODx 12-08-2006 by [email protected]
            
            Set the configuration value for the ID of the module
            you can find the ID of the module by looking at the link to it in the Modules menu
            &modId=Module ID;int;79f3ed26647ddd30dcb42b5f891e1321
        
        


        however, if I click on anything within the module getting the following error - No record found for ID 0

        In system events - Undefined variable: modId

        I’ve obviously done something silly, if anyone could help that would be great!


        Thanks
        Sian
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          The ID is what shows in the URL if you hover the mouse over the link to the module in the main Manage Modules page. The link will look something like "index.php?a=108&id=3". In this case, the id would be 3.
            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
            • 27166
            • 58 Posts
            embarrassed Sorry, didn’t realize it was that!

            Where abouts do I now put that information within the module? And do I put in the full line - &modId=Module ID;int;4 do I need to put a ; after the 4?

            I have tried putting this line in after the include in the module but again, I’m getting the wrong end of the stick obviously!

            Thanks for your help!

            Sian
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              The line goes in the configuration. That is the Configuration tab, and the field Module configuration.

              &modId=Module ID;int;4


              The &modid is the variable name (will end up as $modid within the module). The first part, Module ID, is the caption. The next part is the type, this might be text or int. The last part is the default value. If you had more configuration values, they would follow the same format, &name=Caption;type;value &name2=Caption2;type;value etc.

              Once you put the line in the field, the form will change to show the Caption and a field for changing the value if necessary.
                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
                • 27166
                • 58 Posts
                Many thanks, it’s working great now.

                Thanks so much for your great help and patience!

                Sian
                  • 16915
                  • 52 Posts
                  Little bump to say its a great Snippet. Works like a charm for me.

                  Now comes my little question :
                  I was wondering if there was a way to incorporate automatically some elements from the modx database like :
                  a list of the last new documents created, for instance.

                  so it can really be linked to modx
                  (i know, i know, i’m always asking for too much grin)

                  If someone has any hint on how to do that ?
                    http://www.la-rencontre.info"" target="_blank" rel="nofollow">Rencontre Musulmane

                    http://www.picsof.asia"" target="_blank" rel="nofollow">Picture Asia
                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                    Indeed, I have planned to be able to just click on the document tree to select a document to send, and also to tie up the mailinglist to MODx usergroups. That would make it fairly easy to have multiple lists; just select your webgroup, select your document, and go. But finding the time to do it is another matter...
                      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
                      • 1511
                      • 144 Posts
                      I haven’t installed KoopsMailinglist yet because I suspect it supports only a single mailing list per site. Is that correct?

                      If this is true, which mailinglist support do you recommend?