Copied to clipboard

Flag this post as spam?

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


  • k 256 posts 654 karma points
    May 12, 2021 @ 06:38
    k
    0

    Consume web api data as prevalue in umbraco forms

    Hello,

    I would like to consume web api data as prevalue and call the prevalue as a dropdown in umbraco forms.

    Is the above possible.

    Thanks for helping

    Kusum

  • AnandBhopale 54 posts 172 karma points
    May 12, 2021 @ 07:24
    AnandBhopale
    0

    yes, possible.

    1. You have to introduce a new class in code
    2. In the class use inheritance to Inherit from FieldPreValueSourceType
    3. introduce property for web api (this will help form designer to put web api url)
    4. implement GetPreValues method In this method call web api property and call api using WebClient http = new WebClient()
Please Sign in or register to post replies

Write your reply to:

Draft