Copied to clipboard

Flag this post as spam?

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


  • marcusarnfast 1 post 21 karma points
    Feb 16, 2022 @ 21:29
    marcusarnfast
    0

    Is it possible to link formulate to CMS item list?

    Hi!

    I hope I can get some help here. I am wondering if it's possible to have formulate be page based and intergrated with a variable item list.

    So in this case I want to create a form for each model page. I want it to possible to chose one of the radial buttons (Excuse my bad illustration) and multiple items of the "udstyr" list with checkboxes.

    Sincerely,

    Marcus

    enter image description here

  • Nicholas Westby 2054 posts 7100 karma points c-trib
    Feb 16, 2022 @ 21:50
    Nicholas Westby
    0

    I'm not 100% sure what you're asking, but I suspect you're asking whether or not the data you show within the form on the page can vary depending on the current page displaying the form. If so, the answer is yes.

    Here is a place you can start looking: https://our.umbraco.com/packages/backoffice-extensions/formulate/formulate-questions/79633-formulate-036-just-released-data-value-list-functions

    Basically, you can have a C# function return a list of values that can be used to populate the values shown in form fields, such as a drop down or radio button list.

    This C# function can return different values depending on its current context. So it could return values from the current Umbraco page that is displaying the form, which seems like what you may be after.

    Here's a concrete example. Suppose you have a form that allows a user to order a product, and that you display this form on a product detail page. Maybe this product is a shirt or some other item of clothing. Maybe one of the fields is "Size" and another field is "Color".

    You could have the size and color fields derive their values (small/medium/large, red/green/blue) from the current product detail page. Perhaps your product detail page has a field for allowed sizes and allowed colors. The C# classes you use as your data sources could extract the sizes and colors from those fields.

    There are a few more exotic approaches you could take as well, but this is probably the most straightforward for what it seems like you're trying to accomplish.

Please Sign in or register to post replies

Write your reply to:

Draft