Dynamic Pages in Umbraco Form

Hi all

I am creating a form/wizard in Umbraco and I have a scenario where a 2nd page won’t always be shown based on some server matching rules and a certain scenario returned. I’ll try to explain my requirement here

Page 1 (always shown)

  • 2 text fields asking customer for 2 IDs
  • Custom validator runs on these to check if they are a valid combination

Page 2 (currently always shown but should be optional)
Using these 2 IDs, I want to make a call to the server to perform a matching exercise. I have added a partial view component to my form and injected an API Client so I can call to the server. Depending on the result I may ask them for more information on Page 2. If scenario 1, I don’t want to show the 2nd page and instead want the workflow to kick off straight away.

I think my problem is that my call to the server is injected into a partial view in page 2. Once it starts rendering the partial view to make the call, it has to display this page. This is fine for the 2nd scenario but not for the first. I need a way where I can call the server between page 1 and page 2 then I can add a condition on the 2nd page.

Any pointers please would be greatly appreciated.

Instead of “guys”, may we suggest, for example: “folks", “Umbracians”, “all”, or “everyone”? We use gender inclusive language in this forum :grinning_face: (read more)

1 Like