Copied to clipboard

Flag this post as spam?

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


  • Simeon Ostberg 123 posts 389 karma points
    Nov 12, 2021 @ 10:03
    Simeon Ostberg
    0

    Umbraco Forms: Get a value from a hidden field into another field

    Hi there,

    Is there a way to call the default value of a hidden field in another text field.

    Let's say: I have a hidden field with this default value: 125,00 I want to create a text field: "The price is 125,00 Euros." Then the "125,00" shall come from the hidden field. Is there a way to get that?

    Best, Simeon

  • Kevin Meilander 82 posts 408 karma points c-trib
    Nov 16, 2021 @ 01:18
    Kevin Meilander
    0

    There are a lot of magic strings you can use to pull in data, but I don’t think you can get to other fields values on the front end.

    https://our.umbraco.com/documentation/add-ons/umbracoforms/developer/Magic-Strings/

    If that doesn’t work, you could write some custom JavaScript and/or make a custom form field to do the logic you need.

    https://our.umbraco.com/documentation/Add-ons/umbracoforms/developer/extending/adding-a-fieldtype

  • Simeon Ostberg 123 posts 389 karma points
    Nov 16, 2021 @ 08:23
    Simeon Ostberg
    0

    Hi Kevin,

    Thanks for your help! I tried all of them before, but this didn't work. I tried:

    [fee]
    [@fee]
    [#fee]
    {fee}
    

    All of these I tried as a default value in a text field. Would I need to go for JavaScript then?

    Best, Simeon

  • Kevin Meilander 82 posts 408 karma points c-trib
    Nov 17, 2021 @ 03:39
    Kevin Meilander
    0

    Yeah then you probably have to go the custom field / JavaScript route.

  • Simeon Ostberg 123 posts 389 karma points
    Nov 24, 2021 @ 14:39
    Simeon Ostberg
    0

    Ok, thank you!

    Best, Simeon

  • 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