Copied to clipboard

Flag this post as spam?

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


  • mizzle 90 posts 325 karma points
    Jul 07, 2021 @ 20:42
    mizzle
    0

    Best way to make MVC form information more "dynamic"?

    I currently have the MVC forms on my site set up so that all the customizable information (title, copy, thank you message, what email address the form is sent to, etc.) is customizable in Umbraco and then the node ID of the form page is hardcoded within the form model code. The ID is set and the field values are pulled through the model as public strings. This is fine if I only need one form but less fine if I want forms with different titles, copy, or going to different email addresses.

    Is there a way I can set this up so that forms can be selected via a Content Picker instead of having to hard code the IDs? I would like to have the form as a Nested Content type and select the details from there, but re-use the same MVC files for multiple forms.

    I'm not familiar with the way that information could be passed through the MVC files so that everything about the form is more dynamic. I don't mind completely starting over with my form setup if it means avoiding hardcoding how the form pulls its content information.

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Jul 07, 2021 @ 22:32
    Alex Skrypnyk
    0

    Hi

    Try to use Umbraco Forms - https://umbraco.com/products/umbraco-forms/

    It's not free, but it's the best way to manage forms with Umbraco CMS.

    Thanks,

    Alex

  • mizzle 90 posts 325 karma points
    Jul 08, 2021 @ 01:07
    mizzle
    0

    Sorry, that's not what I'm after.

  • mizzle 90 posts 325 karma points
    Jul 13, 2021 @ 15:51
    mizzle
    0

    Does anyone have any ideas?

    I reiterate that I really just need a method for grabbing IDs through MVC files. I just don't know the code that would be necessary for capturing an ID from a content picker and sending that ID's information through to be used by the form.

Please Sign in or register to post replies

Write your reply to:

Draft