Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dan Evans 629 posts 1016 karma points
    Feb 09, 2011 @ 08:59
    Dan Evans
    0

    Submiting the form - XPATH example

    When submitting the form there is the option to use XPATH as the destination for the thank you page. Does anyone have a sample XPATH as I can't seem to get it to work. For example the nex-sibling of doc type "ThankYou".

    Using Umbraco 4.5

  • Comment author was deleted

    Feb 09, 2011 @ 12:45

    The xpath should provide an id

    So $currentPage/@id should work

     

    (if you already have a node selected try clearing that, saving the form and then setting the xpath)

  • Dan Evans 629 posts 1016 karma points
    Feb 09, 2011 @ 12:58
    Dan Evans
    0

    That's what i thought but it's just reloading the same page. I want to send it to a sibling of a particular doc type so:

    $currentPage/parent::*[@isDoc]/child::*[@isDoc and name()='QuizVoucher']/@id

    But this doesn't work

  • U10 1 post 21 karma points
    Feb 09, 2011 @ 14:14
    U10
    0

    As I understand, you want to get all sibling nodes?

    You can use 2 operators: following-sibling and preceding-sibling. Their sum will give you all following and preceding nodes of one level..

     

    And about $currentPage/parent::*[@isDoc]/child::*[@isDoc and name()='QuizVoucher']/@id ... I've check itm it works fine.. May be wrong node name?

  • Comment author was deleted

    Feb 10, 2011 @ 09:59

    @Dan, and does the form editor store your xpath ? If it doesn't make sure to clear the selected nodeid first, then save the form and then set the xpath

    If it does save your xpath and it doesn't work then you propably have an error in your xpath expression

  • Dan Evans 629 posts 1016 karma points
    Feb 10, 2011 @ 10:01
    Dan Evans
    0

    It did store the XPATH and I did delete the selected node first.

    However it just started working this morning after no changes. Is there some caching mechanism that may have caused this?

  • Comment author was deleted

    Feb 10, 2011 @ 10:13

    There is a form cache but this should be cleared if you make any changes to the form...

    But glad it's working!

    Cheers,
    Tim

  • Dan Evans 629 posts 1016 karma points
    Feb 10, 2011 @ 10:16
    Dan Evans
    0

    Thanks Tim. I did find a post about a video on this topic but couldn't locate the video. Does it exist?

  • Comment author was deleted

    Feb 10, 2011 @ 10:26

    Yeah there was one, but looks like it got lost when we migrated to the new site, will re-add those missing ones.

    Cheers,
    Tim

Please Sign in or register to post replies

Write your reply to:

Draft