Tips for Building a Dynamic, Conditional Layout

Building a front end for a calculation tool (see attached image).

Question is about best way to dynamically update which cards are displayed here.

There are required inputs and optional “events” and clicking one of these events will take you to a new page with all of the associated fields.

Trick is - depending on how they fill out that form - I may need to add new events to the Required list. For example, if they complete the Relationship Details event and say they are married, then I will want to display a new required event for the spouse’s details.

What’s the best way of structuring this? Create all of the possible event cards, put them in a repeating group, set some sort of conditional state. If an event fields answer triggers a new event to be present, then change the state on the required event?

Also want the sort order to be structured. Assign each card a custom sort number and use that to control the sort?

The rest seems straightforward (unless I am missing anything). Once an event has been filled out, I’ll conditionally change the card to light blue (signifying complete). A user can click on it it edit their settings. Any other gotchas I should be thinking about in advance?

I got the repeating groups to work - created a table of Events (Income, Relationship, Childcare Requirements). All good. Even set a display state so that only initial cards will show that I want and I can use triggers to display other ones at a later date.

Piece I am struggling with now is that I want a user to be able to select Income and redirect them to Page X or Popup X and when they select Relationship, redirect them to Page Y or Popup Y. There is no link or URL field type. Any tips on best practices for this? Drop the whole bubble URL into a text field? Must be something more elegant than that.

For your first post: You designed it how I would design it if faced with the same problem. I think this is the best way.

Second post: Three ways come to mind. All are effective, essentially is your choice.

  1. Drop the URL into the text field like you suggested.
  2. Make link elements invisible in the repeating group and only show if the type is Relationship or Income or whatever. The links will be invisible in all the other cells.
  3. (How I would do it) Workflow action that says when group within repeating group is clicked only when Current cell is Relationship (not sure how your database is defined so this will be different for you) - go to Page X

Sweet. I’ve been fumbling my way towards the third solution you mentioned with some conditional logic like that. I’m not overly familiar with the “group within repeating group” which sounds more elegant than my approach. Going to go read up on that - thanks!

This topic was automatically closed after 70 days. New replies are no longer allowed.