Copied to clipboard

Flag this post as spam?

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


  • Søren Kottal 530 posts 3521 karma points MVP 2x c-trib
    Aug 05, 2015 @ 09:00
    Søren Kottal
    0

    Save to input specific node using xpath in contour

    Is it possible to make an xpath to save a new document in a node relative to one of the form fields?

    Like //Submissions/Category[name=$formfield]

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Aug 05, 2015 @ 09:30
    Tim Geyssens
    100

    Hmm not sure will have to check the code for that but in case it works it should be the with the following syntax //Submissions/Category[name=[$formfield]]

    so[$formfield] will be replaced

  • Chriztian Steinmeier 2726 posts 8320 karma points MVP 4x admin c-trib
    Aug 10, 2015 @ 09:09
    Chriztian Steinmeier
    0

    A quick "outside" observation: Using square-brackets as part of the replacement could potentially be a problem, since the XPath itself will be invalid...

    Any specific reason for having to use them like that?

    /Chriztian

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Aug 11, 2015 @ 08:02
    Tim Geyssens
    0

    @Chriztian, well the replacement will happen on the string before it is used as an xpath statement

  • Chriztian Steinmeier 2726 posts 8320 karma points MVP 4x admin c-trib
    Aug 11, 2015 @ 08:14
    Chriztian Steinmeier
    0

    hehe - I'm totally aware of that, didn't mean to sound as if I didn't get it :)

    It's just that in other places where XPath is used (e.g. the MNTP) they're just "magic variables" – here, you also need to wrap them in square brackets, which has their own meaning in XPath - so can be potentially confusing if you've started to get familiar with XPath for some of the places it can be used...

    Really, I was probably more concerned about the consistency-issue than the XPath-issue here.

    /Chriztian

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Aug 05, 2015 @ 09:32
    Tim Geyssens
    0

    Currently it won't work but it's an easy update if you are up for upgrading to a nightly?

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Aug 05, 2015 @ 09:39
    Tim Geyssens
    1

    Just made the changes, you can upgrade to 3.0.29 WIP build that available here http://nightly.umbraco.org/Umbraco%20Contour/3.0/UmbracoForms.files.3.0.29.WIP-Build.50.zip

  • Søren Kottal 530 posts 3521 karma points MVP 2x c-trib
    Aug 06, 2015 @ 13:05
    Søren Kottal
    0

    Thanks, I will look into that!

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Aug 10, 2015 @ 08:32
    Tim Geyssens
    0

    So did that do the trick?

  • Søren Kottal 530 posts 3521 karma points MVP 2x c-trib
    Aug 19, 2015 @ 06:25
    Søren Kottal
    0

    Unfortunately, I haven't been able to upgrade yet.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies