Copied to clipboard

Flag this post as spam?

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


  • Craig100 1136 posts 2523 karma points c-trib
    Oct 15, 2018 @ 09:48
    Craig100
    0

    Form Post to an EndPoint

    Has anyone managed to get an Umbraco Forms workflow to post to Click Dimensions successfully? Just wondering if I'm wasting my time trying to replace a working hand-coded form with an Umbraco Form.

    I can see the POST from the browser back to the web server has GUIDs as field names. I'm guessing it's the same from the web server to the Click D endpoint. If so, is it possible to intervene to set the field names/ID's as Click D requires them?

    Thanks,

    Craig

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Oct 15, 2018 @ 10:30
    Ismail Mayat
    0
  • Craig100 1136 posts 2523 karma points c-trib
    Oct 15, 2018 @ 10:36
    Craig100
    0

    Thanks Ismail,

    I'll take a look at that. Could be a way of working out what's currently sent and seeing if the label values are still there to swap out with the GUIDs. If it has to be totally hand-coded then there's no point swapping out the current form for an Umbraco one.

    Thanks for the pointer :)

  • Tom van Enckevort 107 posts 429 karma points
    Oct 15, 2018 @ 10:41
    Tom van Enckevort
    1

    Hi Craig,

    Have you tried using the Send Form to URL workflow that comes with Umbraco Forms?

    That does allow you to post to a custom URL and map the form field values you want to send across, including custom field names (so it won't use the Umbraco Forms GUIDs).

  • Craig100 1136 posts 2523 karma points c-trib
    Oct 15, 2018 @ 10:54
    Craig100
    0

    Hi Tom,

    Yes, I'm using that workflow at the moment but not using the mapping section as it's not at all clear how to use it. I've not been able to find any documentation on it other than : "Send form to URL Sends the form to a url, either as a HTTP POST or GET". The fields and labels are ambiguous: "Alias", "Form Value" and "Static Value" so left them alone. It gave me the impression it would overwrite the user-entered value with a pre-determined "Static" value which isn't what I want to do. Do you know what it actually does?

  • Tom van Enckevort 107 posts 429 karma points
    Oct 15, 2018 @ 11:22
    Tom van Enckevort
    101

    Yes, it's a bit confusing.

    The way it works is:

    • Alias: the name of the field that gets sent across (so this should match whatever ClickDimensions is expecting).
    • Form Value: select the form field whose value you want to set in that form field that gets sent across.
    • Static Value: sometimes you want to include a static value that is the same for all requests. In that case you can set that static value in here and you want to keep the Form Value empty in that case (since it doesn't need to be mapped to a form field).

    So when you have the Form Value set, you would just leave the Static Value empty.

  • Craig100 1136 posts 2523 karma points c-trib
    Oct 15, 2018 @ 13:51
    Craig100
    0

    Thanks Tom,

    I'm currently setting that up now (a lot of fields). I'll report back when I get it going.

    Thanks again.

  • Craig100 1136 posts 2523 karma points c-trib
    Oct 23, 2018 @ 07:50
    Craig100
    0

    Setting all the values up took a while but worked beautifully. Just have to remember to "enable" the workflow when you're done ;)

    I'll have a look at updating the docs around it so it's as clear as Tom's explanation. (PR sent)

    Thanks

    Craig

  • Anna 1 post 71 karma points
    Feb 11, 2020 @ 10:23
    Anna
    0

    Hi Craig!

    Do you mind sharing your code? im having similar problems.. cant seem to post to an endpoint

Please Sign in or register to post replies

Write your reply to:

Draft