We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19613
    • 70 Posts
    Hi guys... (Sorry I feel like I am dominating this board... so many questions... so little time)

    Is there a way to make to forms work on the same page... I want to seperate 2 forms using CSS/Java tabs.
    i made a working model but the calls bust the page see below:

    <div id="content_tabs">
    <div id="content_nav">
    <ul>
    <li class="active" onclick="javascript:doShow(this, 'one');">Sponsorship</li>
    <li onclick="javascript:doShow(this, 'two');">Appearance</li>
    </ul>
    </div>
    <div id="content_data"><div></div>
    <div id="one" class="active">
    <h3>Sponsor Search</h3>
    <p>Hello, [[namesession]] please fill in your request below,</p>
    <p>Please note: All fields are required.</p>
    
    [[eformUserInfo]]
    [!eForm? &formid=`sponsorTeam` &subject=`[+subject+]` &to=`[email protected],[email protected]` &bcc=`[+webEmail+]` &tpl=`sponsorTeam` &report=`sponsorTeamReport` &invalidClass=`invalidValue` &requiredClass=`requiredValue` &cssStyle=`ContactStyles` &gotoid=`46` &eFormOnBeforeMailSent=`eformUserData` !]
    
    </div>
    
    <div id="two">
    <h3>Appearance Search</h3>
    <p>Hello, [[namesession]] please fill in your request below,</p>
    <p>Please note: All fields are required.</p>
    
    [[eformUserInfo]]
    [!eForm? &formid=`AppearanceTeam` &subject=`[+subject+]` &to=`[email protected]` &cc=`[+webEmail+]` &tpl=`AppearanceTeam` &report=`AppearanceTeamReport` &invalidClass=`invalidValue` &requiredClass=`requiredValue` &cssStyle=`ContactStyles` &gotoid=`46` &eFormOnBeforeMailSent=`eformUserData` !]
    </div>
    </div>
    </div>
    


    The pages work individually but when used in this way the following message pops up:


    Fatal error: Cannot redeclare eformuserdata() (previously declared in /home/teamaddi/public_html/manager/includes/document.parser.class.inc.php(769) : eval()’d code:4) in /home/teamaddi/public_html/manager/includes/document.parser.class.inc.php(769) : eval()’d code on line 14

    I take it that’s becuase of the calls being proccessed at the same...
    Can one snippet procees both but onlt send the info from the form filled in?

    Hope that makes sense....
    thanks
      • 3749
      • 24,544 Posts
      Try taking out the second [[eformUserInfo]] call (and I think the remaining one should probably be [!eformUserInfo!] ).
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 19613
        • 70 Posts
        Thanks. That was an easy one... can’t believe I didn’t spot it! embarrassed
          • 3749
          • 24,544 Posts
          I’m glad it worked. smiley
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting