Skip to main content
Zachariah Rosenberg が「#Flow」で質問
I'm creating a visual workflow which will guide a user through creating different sObjs. Depending on user input from a previous page, I'd like to show/hide future fields.

Example:

 

Screen 1

---------

Display: Would you like Beer or Juice?

Input Field: Dropdown

Screen 2

--------

Display: Select a type

Input field: Dynamic Dropwdown

(If beverage.type == 'Beer')

Display: Please enter your age

Input: Integer Box

On screen 2, there is no need to show the age integer box if the beverage type is juice. What I would like to be able to do is be able to show/hide fields based on certain boolean vars (i.e. Boolean Beverage_is_alcohol).

This is a simplistic example. The use case has multiple screens with sufficiently more "show/hide" fields that it would make the form page significantly longer.

I haven't seen anything in the Visual Flow documents that show a standard way to accomplish this. I have two thoughts on how I might solve this - but before choosing either, I'd like to ask for ideas.

Option 1 - Multiple Screen Options

Create several screens with different field combinations. Create Decision Nodes to route user to the screen with the correct combination of fields.

*This may require we create an exponentially growing amount of screens. This option is likely not scalable.

Option 2 - jQuery Dom Manipulation

Find a way to signal JS which field set should be shown and find fields via element.id and hide them (or remove, considering that hiding doesn't shrink the form size)

*This option requires a developer be made available for changes. I'd prefer if non-technical users can make changes to the workflow.

Is there an option 3? If not, perhaps you can offer some advice about which of the above two is the better path?

Thank you!
2 件の回答
0/9000