input widget for recording the attributes of >=0 complex objects

Hi all!

I would like to understand if there is some combination of widgets and panels that might enable the following use case:

  • I want users to be able to record the attributes of a complex object (here I'm using 'complex' loosely -- just a thing consisting of fields with values, some optional and not)
  • for instance, in the context of recording one's vehicles, we might want the application to do the following:
  1. Ask the user if they have any vehicles. If yes, surface a collection of fields for recording some set of attributes about their first vehicle
  • make
  • model
  • year
  • color
  1. After entering the first vehicle, ask if they have any remaining vehicles.
  • if yes, surface a form with the attributes above for vehicle #2
  • then ask if they have any further vehicles

And then rinse and repeat.

I know how to do conditional panels and outputs based on input condition but I think I'm getting tripped up on how to populate objects in a collection of said objects of arbitrary length. Any help would be appreciated.

Thanks!

SrikanthX

I recommend you read section 10.3.2 of the shiny book :

Thanks so much for the reference! That looks very promising.

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.