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

    I am using Wayfinder to insert an "indented checkbox" product menu in an eForm email form in a website recently upgraded from 1.0.10 to to 1.0.12.

    Everything was working fine in 1.0.10 and below - but for some reason the wayfinder classes (level and first / last) don't seem to be working.

    The same level is being returned for every resource in the menu:
    last lev2

    Eg:
     <div>
      <label class="checklabel"><input class="chckbx last lev2" type="checkbox" name="pro[]" value="Product Category" /><span>Product Category</span></label>
     </div>
    <div>
      <label class="checklabel"><input class="chckbx last lev2" type="checkbox" name="pro[]" value="Product 1" /><span>Product 1</span></label>
     </div>
     <div>
      <label class="checklabel"><input class="chckbx last lev2" type="checkbox" name="pro[]" value="Product 2" /><span>Product 2</span></label>
     </div>
      <div>
      <label class="checklabel"><input class="chckbx last lev2" type="checkbox" name="pro[]" value="Product 3" /><span>Product 3</span></label>
     </div>


    when it should be:
     <div>
      <label class="checklabel"><input class="chckbx last lev1" type="checkbox" name="pro[]" value="Product Category" /><span>Product Category</span></label>
     </div>
     <div>
      <label class="checklabel"><input class="chckbx lev2" type="checkbox" name="pro[]" value="Product 1" /><span>Product 1</span></label>
     </div>
     <div>
      <label class="checklabel"><input class="chckbx lev2" type="checkbox" name="pro[]" value="Product 2" /><span>Product 2</span></label>
     </div>
      <div>
      <label class="checklabel"><input class="chckbx last lev2" type="checkbox" name="pro[]" value="Product 3" /><span>Product 3</span></label>
     </div>


    This is the details of my Wayfinder call...

    snippet call
    [[Wayfinder? &startId=`128` &level=`0` &levelClass=`lev` &sortBy=`menuindex` &showSubDocCount=`true` &displayStart=`true` &outerTpl=`ef-menu-wrapper` &startItemTpl=`ef-menu-starter` &rowTpl=`ef-menu-row`]]


    wrapper item template
    [+wf.wrapper+]


    start item template
    [+wf.wrapper+]


    row template
    <div>
      <label class="checklabel"><input class="chckbx [+wf.classnames+]" type="checkbox" value="[+wf.title+]" name="pro[]" /><span>[+wf.title+]</span></label>
     </div>[+wf.wrapper+]


    Any ideas what I can do to get it working again?

    Thanks in advance. [ed. note: nickf08 last edited this post 10 years, 5 months ago.]
      Web design Adelaide
      http://gocreate.com.au
    • Looks a bit that Wayfinders [+wf.classnames+] placeholder is filled in/rendered too late. Strange.

      If you don't want to get any hassle with Snippet calls in eForm-Chunks you could try the phxeform package. Snippet calls are processed before eForm works on its template chunks.
        • 21417
        • 486 Posts
        Thanks Jako.

        Ah ok - I think you are right because when I put the menu chunk on an another page (eg not in the form) I can see that the [+wf.classnames+] work as expected.

        This never happened in previous Evo versions.

        I tried your snippet using this call but unfortunately there is no difference with the [+wf.classnames+] in the menu. They still all say "last lev2"

        This is my updated eForm call:
        [!eForm? &formid=`emailForm` &to=`[email protected]` &subject=`[(site_name)] website enquiry` &fromname=`((name))` &from=`((email))` &replyto=`email` &tpl=`Email-Form-HTML` &report=`Email-Form-Report` &thankyou=`Email-Form-Success` &invalidClass=`error` &sendAsText=`1` &eFormOnBeforeFormParse=`phxBeforeFormParse` &eFormOnBeforeMailSent=`phxBeforeMailSent` &runSnippet=`phxeform`!]
        


        The email report does send through to my email address but on screen you get a message "AutoText: Mailer was unable to send mailMessage body empty" instead of the thankyou chunk.

        And the checked "checkbox values" do not get included in the email report - instead I see the placeholder in the report...
        Product(s):
        [+pro+]

        Any other ideas?
          Web design Adelaide
          http://gocreate.com.au
        • Seems that you have found a bug in phxeform. It should check if autotext is set before it sets the autotext placeholder.

          Should be fixed here: https://github.com/Jako/phxeform/commit/8480ee1f1f94dd1e6e5f57041937fc38637cc97f

          The Wayfinder issue was maybe introduced here:
          https://github.com/dmi3yy/evolution/commit/ee6cbea4d4e2f72fab24c80a233691f08ab9acf7

          It should be fixed here:
          https://github.com/Jako/evolution/commit/60070b13456b714a3ce9c008c50ec1e874252898

          [ed. note: Jako last edited this post 10 years, 5 months ago.]
            • 21417
            • 486 Posts
            Thanks for the updated snippets Jako.

            I updated phxeform and Wayfinder.

            Now I can now send the form without the "AutoText: Mailer was unable to send" message appearing which is great - but the thank you chunk still does not appear.

            In the emailed report I still see [+pro+] instead of the expected "checkbox values" that were checked.

            And unfortunately the generated [+wf.classnames+] in the menu still all say "last lev2".

            Have you got any other tricks?


              Web design Adelaide
              http://gocreate.com.au
            • Try the latest commit on https://github.com/Jako/phxeform. Should fix the checkbox issue and the report issue in phxeform.

              But I dont see any issue in wayfinder code that could cause the classnames problem.
                • 21417
                • 486 Posts
                Thanks for your help Jako.

                (sorry for the delay in reply, I was having trouble logging into these forums recently)

                The updated phxeform now works as expected - the thank you message appears and the checkbox values are included in the email report. Thank you.

                Unfortunately the generated [+wf.classnames+] in the menu still all say "last lev2".

                Now that puts me back to square one because that is exactly how the standard eform call is behaving at the moment.

                Has something changed in eform between 1.0.10 and 1.0.12 perhaps that might affect it?

                It's really weird - even when testing with a manually created list pasted inside the eform html template, the class names get changed to all say "last lev2".

                Eg - this manual list...
                <div>
                 <label class="checklabel"><input class="chckbx lev1" type="checkbox" name="pro[]" value="Product Category 1" /><span>Product Category 1</span></label>
                </div>
                <div>
                 <label class="checklabel"><input class="chckbx lev2" type="checkbox" name="pro[]" value="Product 1" /><span>Product 1</span></label>
                </div>
                <div>
                 <label class="checklabel"><input class="chckbx last lev2" type="checkbox" name="pro[]" value="Product 2" /><span>Product 2</span></label>
                </div>
                <div>
                 <label class="checklabel"><input class="chckbx lev1" type="checkbox" name="pro[]" value="Product Category 2" /><span>Product Category 2</span></label>
                </div>
                <div>
                 <label class="checklabel"><input class="chckbx lev2" type="checkbox" name="pro[]" value="Product 1" /><span>Product 1</span></label>
                </div>
                <div>
                 <label class="checklabel"><input class="chckbx last lev2" type="checkbox" name="pro[]" value="Product 2" /><span>Product 2</span></label>
                </div>

                is changed to:
                <div>
                 <label class="checklabel"><input class="chckbx last lev2" type="checkbox" name="pro[]" value="Product Category 1" /><span>Product Category 1</span></label>
                </div>
                <div>
                 <label class="checklabel"><input class="chckbx last lev2" type="checkbox" name="pro[]" value="Product 1" /><span>Product 1</span></label>
                </div>
                <div>
                 <label class="checklabel"><input class="chckbx last lev2" type="checkbox" name="pro[]" value="Product 2" /><span>Product 2</span></label>
                </div>
                <div>
                 <label class="checklabel"><input class="chckbx last lev2" type="checkbox" name="pro[]" value="Product Category 2" /><span>Product Category 2</span></label>
                </div>
                <div>
                 <label class="checklabel"><input class="chckbx last lev2" type="checkbox" name="pro[]" value="Product 1" /><span>Product 1</span></label>
                </div>
                <div>
                 <label class="checklabel"><input class="chckbx last lev2" type="checkbox" name="pro[]" value="Product 2" /><span>Product 2</span></label>
                </div>

                This has really got me stumped.

                Any other ideas?





                  Web design Adelaide
                  http://gocreate.com.au
                • Think you have found a long lasting issue in eForm. Before 1.4.4.8 or 1.4.4.9 calling snippets inside eForm template was not possible. So those snippets calls were executed outside of eForm and the classes issue with checkbox form fields did not occur.

                  In your case: The inputs with a name attribute containing an array generated by the wayfinder call were not parsed by eForm before. This is now the case and there is a class issue with those special form fields.

                  Fixed it here: https://github.com/Jako/evolution/commit/88f4d99c2b490c97bbf64b8e2d8f144f9040711b [ed. note: Jako last edited this post 10 years, 5 months ago.]
                    • 21417
                    • 486 Posts
                    Eureka! That fixed it, thanks Jako.

                    Updating eForm did it for the menu call inside the eForm html.
                    (it also works now for a chunk with a manual list and an inline manual list).

                    Genius!

                    Thanks so much.

                    Just confirming that only the eform fix was needed for this - it works fine for me with the standard Evo 1.0.12 Wayfinder and without phxeform.

                    Cheers.
                      Web design Adelaide
                      http://gocreate.com.au