We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33238
    • 388 Posts
    Hello, i have twho different eform calls, one for spanish, one for english!

    English:
    [!eForm? &formid=`bookingForm` &subject=`[*pagetitle*]` &to=`[email protected]` &ccsender=`0` &tpl=`formResEn` &report=`formResEnReport` &fromname=`Web Reservation` &from=`[email protected]` &gotoid=`46` &protectSubmit=`0` !]

    Spanish:
    [!eForm? &formid=`bookingForm` &subject=`[*pagetitle*]` &to=`[email protected]` &ccsender=`0` &tpl=`formResEs` &report=`formResEsReport` &fromname=`Web Reservation` &from=`[email protected]` &gotoid=`46` &protectSubmit=`0` !]

    On both Forms:

    <form method="post" action="(yams_doc)" id="bookingForm" name="bookingForm">
    <input name="formid" type="hidden" value="bookingForm" />
    ...</form>

    Everything works perfect, BUT the Thank you page allways go to the main language: English

    --

    Do I need to do something special to sent the Spanish form to the thank you page in Spanish and not in English?

    Any Ideas??? Thank you!
      --
      ysanmiguel.com
      • 15001
      • 697 Posts
      Hello,

      You're right but there are two easy manners to solve this issue:

      A) This is my favorite method:

      1. Create one MODx web link for each language by clicking on the "chain" button above the document tree
      2. Set as web address the correct link to your multilingual "Thank you" page. For instance if the link should redirect to the Spanish version and your "Thank you" page has id 33:
        http://www.yoursite.ext/es/index.php?id=33
      3. For each language, create one different call to the eform snippet and use the id created at point 2 for the &gotoid parameter. The miscellaneous links will each redirect to the correct linguistic version of the "Thank you" page.

      B) An alternative method is to use the &thankyou parameter instead of &gotoid and create one "Thank you" chunk per language.
      &thankyou=`eFormContactThankyou_(yams_id)`

      See: http://rtfm.modx.com/extras/evo/yams/yams-english-documentation/yams-how-to/yams-eform
      In this case, you'll stay on the "Contact" page after the form was sent and the content of the form is replaced by the chunk.
      This is less flexible if your page contains elements that comes from the template. For instance, if your page template inserts the page title like this <h1>[*pagetitle*]</h1>, and your contact page has the title "Contact", this word will stay besides your "Thank you" message. This is why solution "A" is my favorite if the template is not minimalist.

      Bye.