We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11712
    • 8 Posts
    Hello,

    I think the solution is very easy, but I’ve been spending several hours to understand what I’m doing wrong, I must recognize I’m really lost ! :’(

    I’m building a contact form on my site with eForm. The snippet is working well and I want to implement something special : sending email to webgroup, (it should reach a population with some turnover that I’d like to manage efficiently...)
    I thought I could do it by using a dynamic TV : my goal is to build the "[email protected],[email protected],[email protected]" that should fullfill the &to parameter of eForm dynamicaly. So my eForm call could be :

    [!eForm? &formid=`feedbackForm` &to=`[*MailBureau*]` &from=`[+email+]` &fromname=`[+name+]` &tpl=`eFormContact` &report=`eFormEmail` &thankyou=`eFormOKMerci` &vericode=`1` &subject=`Message de [+name+] ([+department+])` &language=`en`!] 


    The [*MailBureau*] TV is made like this :
    Typ : Text
    Optional value : none
    Default value :
    @SELECT email FROM modx_web_user_attributes WHERE internalkey in (select webuser from modx_web_groups WHERE webgroup = 2)
    Widget : Delimited List
    Delimiter : ,
    

    This query is pretty simple and should get all the email adresses of webusers from webgroupId 2
    But I only get a result like this :
    Array,Array,Array,Array,Array,Array,Array,Array,Array

    The "Data Grid" widget shows a beautiful email adress list, so, my query is OK, but with the Delimiter it doesn’t...

    I hope I’m not adressing a stupid issue tongue

    Thanks a lot for your help,

    Olivier
      • 7231
      • 4,205 Posts
      I don’t know the solution to the problem but you could build the query in a snippet and use the @EVAL binding to run the snippet with the runSnippet pai call instead. This will give you more control over the output.
        [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

        Something is happening here, but you don't know what it is.
        Do you, Mr. Jones? - [bob dylan]
        • 11712
        • 8 Posts
        Thanks for your answer. I followed your recommandation and have written a snippet. Everything works fine.

        See http://modxcms.com/forums/index.php/topic,33522.0.html

        Bye,
        Olivier