We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20349 ☆ A M B ☆
    • 453 Posts
    Hmm.... I just tested the similar thing locally...

    Included in the header jQuery 1.2.6. script

    and

    this code
    <script type="text/javascript">
          $(document).ready(function() {
             $('#pp').hide();
       
            $('a#pp-toggle').click(function() {
              $('#pp').toggle(400);
              return false;
            });
          });
    </script>
    


    ... in the body I added this:
    <a href="#" id="pp-toggle">Pošalji prijatelju</a>
    <div id="pp">
    <p class="error">[+validationmessage+]</p>
    
    <form action="[~[*id*]~]" id="SendToFriend" method="post" name="SendToFriend">
    <table width="400" border="0">
      <tr>
        <td width="200" height="60">
        <input type="hidden" name="formid" value="SendToFriend" />
    <p align="center"><label for="sfName1">Vaše ime:<br />
        <input name="name1" type="text" class="text" id="sfName1" size="30" eform="Vase ime::1" /></label></p></td>
        <td width="200" height="60"><p align="center">
          <label for="sfEmail1">Vaša email adresa:<br>
    	<input name="emailfrom" type="text" class="text" id="sfEmail1" size="30" eform="Vasa adresa::1"/></label></p></td>
      </tr>
      <tr>
        <td width="200" height="60"><p align="center">
          <label for="sfName2">Ime prijatelja:<br />
        <input name="name2" type="text" class="text" id="sfName2" size="30" eform="Ime prijatelja::1" /></label></p></td>
        <td width="200" height="60"><p align="center">
          <label for="sfEmail2">Email adresa vašeg prijatelja:<br>
    	<input name="email" type="text" class="text" id="sfEmail2" size="30" eform="Adresa vaseg prijatelja:email:1" /></label></p></td>
      </tr>
      <tr>
        <td height="60" colspan="2"><div align="center">
          <input name="urlsite" type="hidden" value="[(site_url)]" eform="::0::" />
          <input name="link" type="hidden" value="[~[*id*]~]" eform="::0::" />
          <input name="title" type="hidden" value="[*pagetitle*]" eform="::0::" />
            <input class="button" id="sfRecommend" name="recommend" type="submit" value="Pošalji" />
        </div></td>
      </tr>
    </table>
    </form>
    </div>



    This works flawlessy! But when I try to recreate this on MODx... zero points rolleyes

    Any ideas? Thanks in advance
      BASE - Web Design Studio
      MODX Ambassador

      Website
      • 20349 ☆ A M B ☆
      • 453 Posts
      Ok... I got it...

      after some experimenting... I added noConflict() part smiley

      I knew it it’s just some simple thing... rolleyes

      Thanks anyway =)
        BASE - Web Design Studio
        MODX Ambassador

        Website
        • 6726
        • 7,075 Posts
        The thing is since I define noconflict at the begining switching the $ variable to $j, it sure couldn’t work indeed wink

        You don’t have to use it, but it’s better you never know if you need to use mootools or other scripts which are not namespaced...
          .: COO - Commerce Guys - Community Driven Innovation :.


          MODx est l&#39;outil id
          • 7690
          • 166 Posts
          Can someone clean this topic a little bit up?
          There is not a clear way how to do it. Very confusing and a little bit chaotic now.
            • 6726
            • 7,075 Posts
            It’s true I didn’t turn this into documentation but posted an example of how I did it, doesn’t that help figure it out pretty easily ?
              .: COO - Commerce Guys - Community Driven Innovation :.


              MODx est l&#39;outil id
              • 26931
              • 2,314 Posts
              hey everybody,

              this is working great, thanks davidm smiley !

              For the record, I use eForm 1.4.4 / MODx 0.9.6.1p2 and I have PHx 2.1.3 turned on with pixelchutes workaround applied.
              btw. the current eForm (4) - 1.4.4.6 version which ships with MODx 1.0.2 has the workaround already included