Copied to clipboard

Flag this post as spam?

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


  • Marco 15 posts 85 karma points
    Jun 11, 2018 @ 13:54
    Marco
    0

    Populate Programmatically Dropdown umbraco forms

    Hi guys, there is a way to populate Prorammatically a Dropdown List inside Umbraco Forms?

    Thanks

  • Alex Brown 129 posts 620 karma points
    Jun 12, 2018 @ 07:56
    Alex Brown
    1

    I tend to create a custom FieldType for Umbraco forms when doing things like this.

    https://our.umbraco.org/documentation/Add-ons/UmbracoForms/Developer/Extending/Adding-a-Fieldtype

    You can populate the dropdown in the partial view file with Razor.

  • Marco 15 posts 85 karma points
    Jun 12, 2018 @ 15:36
    Marco
    0

    the dropdown is inside an umbraco form, how can I access it? Is there a way to communicate with the umbraco forms fields?

  • Alex Brown 129 posts 620 karma points
    Jun 12, 2018 @ 18:04
    Alex Brown
    0

    You should be able to edit the drop down values manually, is that what you mean? In the forms section in the CMS

  • Marco 15 posts 85 karma points
    Jun 12, 2018 @ 18:45
    Marco
    0

    I need to populate the list because I have a lot of fields to insert and I can not use the form elements via code. Is there a way to populate the list from code? Do you have any practical examples available?

    example: populate the list with all the cities in the world. There is too much data to insert/edit manually.

  • lori ryan 239 posts 573 karma points
    May 13, 2021 @ 09:50
    lori ryan
    1

    Marco did you get a fix for this

  • 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