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
    I have two forms running from the same page using Eform and some content tabs.
    I just tested them and have found that the forms process ok... BUT the validation message is not showing so if someone does not input info they will not know and the form will not process...

    The form(s) work fine when embedded in a single page but not when the 2 forms are together inside div based tabs contolled by java... its not the java causing a problem as I pasted it into the other page and it worked fine still.

    The forms display inside the tabs fone but won’t process/validate (no message shows)

    here is the code:
    <p>&nbsp;</p>
    <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 id="one" class="active">
    <p>Hello, [[namesession]] please fill in your request below,
    Please note: All fields are required.
    [!eForm? &amp;formid=`testForm` &amp;sessionVars=`[webShortname]`&amp;subject=`[+subject+]` &amp;to=`x@xxXxx,` &amp;ccsender=`1` &amp;tpl=`testForm` &amp;report=`testFormReport` &amp;invalidClass=`invalidValue` &amp;requiredClass=`requiredValue` &amp;cssStyle=`ContactStyles` &amp;gotoid=`46` !]</p>
    </div>
    <div id="two">
    <h3>Appearance form</h3>
    Hello, [[namesession]] please fill in your request below,
    Please note: All fields are required.
    [!eForm? &amp;formid=`AppearanceTeam` &amp;subject=`[+subject+]` &amp;to=`x@xxXxx,` &amp;ccsender=`1` &amp;tpl=`AppearanceTeam` &amp;report=`AppearanceTeamReport` &amp;invalidClass=`invalidValue` &amp;requiredClass=`requiredValue` &amp;cssStyle=`ContactStyles` &amp;gotoid=`46` !]</div>
    </div>
    </div>

    anyone got any ideas... i have a tight deadline on this so any help appreciated.

    thanks
      • 10449
      • 956 Posts
      Did you insert a hidden form field for formid in your template(s)?

      see http://svn.modxcms.com/crucible/browse/~raw,r=9/modx-components/eform/docs/eform.htm

      &formid
      This is a unique id used to identity a form during postbacks. This is useful in cases where more than one form exists on a page. Your form template should either have a hidden field with the same formid <input type="hidden" name="formid" value="formName" />or (in eForm 1.4:final) you can set the the id in the form tag itself: <form id="formName"...>;
        • 19613
        • 70 Posts
        I have this at the top of one form:

        <p class="error">[+validationmessage+]</p>
        <p>
        <form action="[~[*id*]~]" method="post" class="mindform"><input name="formid" type="hidden" value="AppearanceTeam"/>
        <input type="hidden" value="[+webShortname+]" />
        <fieldset>
        <legend>Sporting Information</legend>

        and this on tp of other:

        <p class="error">[+validationmessage+]</p>
        <form method="post" action="[~[*id*]~]" id="sponsorTeam" class="mindform"><input name="sponsorTeam" type="hidden" value="sponsorTeam" />
        <input type="hidden" value="[+webShortname+]" />
        <fieldset>
        <legend>Sporting Information</legend>


        Is that correct?