SOLVED

Dynamic number of form elements based on answer

%3CLINGO-SUB%20id%3D%22lingo-sub-1463073%22%20slang%3D%22en-US%22%3EDynamic%20number%20of%20form%20elements%20based%20on%20answer%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1463073%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%20I%20was%20wondering%20if%20it%20is%20possible%20to%20create%20form%20that%20displays%20dynamic%20number%20of%20controls%20based%20on%20user%20answer.%20Maybe%20example%20of%20what%20I'm%20trying%20to%20achieve%20will%20make%20things%20more%20clear.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ELets%20assume%20that%20I%20want%20to%20create%20form%20that%20allows%20user%20to%20provide%20some%20%22ideas%22.%20The%20single%20%22idea%22%20consists%20of%202%20properties%3A%20name%20and%20description.%20Upon%20entering%20the%20form%20user%20is%20asked%2C%20%22how%20many%20ideas%20would%20you%20like%20to%20submit%22%20and%20he%20can%20answer%20that%20question%20with%20a%20number%20between%201%20-%2010.%20Based%20on%20number%20provided%20by%20the%20user%20I%20would%20like%20to%20display%20dynamic%20number%20of%20fields%20where%20user%20can%20provide%20his%20answers.%20For%20example%20user%20enters%203%20in%20number%20of%20ideas%20field%2C%20and%20form%20looks%20like%20this%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENumber%20of%20ideas%3A%203%3C%2FP%3E%3CP%3E%3CSTRONG%3EIdea%201%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EName%3A%20.........%3C%2FP%3E%3CP%3EDescription%3A%20.........%3C%2FP%3E%3CP%3E%3CSTRONG%3EIdea%202%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EName%3A%20.........%3C%2FP%3E%3CP%3EDescription%3A%20.........%3C%2FP%3E%3CP%3E%3CSTRONG%3EIdea%203%3CBR%20%2F%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EName%3A%20.........%3C%2FP%3E%3CP%3EDescription%3A%20.........%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20user%20changes%20the%20values%20of%20number%20of%20ideas%20field%2C%20the%20form%20updates%20automatically%20to%20display%20provided%20number%20of%20fields.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance%20for%20any%20help%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1463073%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EForms%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Forms%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1463215%22%20slang%3D%22en-US%22%3ERe%3A%20Dynamic%20number%20of%20form%20elements%20based%20on%20answer%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1463215%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F699512%22%20target%3D%22_blank%22%3E%40dex2l%3C%2FA%3E%26nbsp%3Bthere%20is%20nothing%20in%20Forms%20that%20enables%20you%20to%20do%20that.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERob%3CBR%20%2F%3ELos%20Gallardos%3CBR%20%2F%3E%3CFONT%20size%3D%222%22%20color%3D%22%23006400%22%3EMicrosoft%20Power%20Automate%20Community%20Super%20Use%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1463809%22%20slang%3D%22en-US%22%3ERe%3A%20Dynamic%20number%20of%20form%20elements%20based%20on%20answer%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1463809%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F174092%22%20target%3D%22_blank%22%3E%40Rob%20Elliott%3C%2FA%3EThank%20you%20for%20your%20answer%2C%20unfortunately%20I%20expected%20that.%20One%20last%20thing.%20Please%20confirm%20if%20I%20understand%20this%20correctly.%20The%20number%20of%20fields%2Finputs%20on%20form%20is%20fixed%20and%20there%20is%20no%20way%20to%20dynamically%20add%2Fremove%20anything%20to%20the%20form%20based%20on%20user%20input%3F%20I%20know%20about%20branching%20feature%20but%20doesn't%20fit%20my%20needs.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1463818%22%20slang%3D%22en-US%22%3ERe%3A%20Dynamic%20number%20of%20form%20elements%20based%20on%20answer%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1463818%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F699512%22%20target%3D%22_blank%22%3E%40dex2l%3C%2FA%3E%26nbsp%3Byou%20are%20correct%2C%20the%20number%20of%20questions%20is%20fixed%20and%20there%20is%20no%20way%20to%20dynamically%20add%20or%20remove%20anything%20based%20on%20a%20user's%20answer.%20You'd%20have%20to%20create%20an%20app%20in%20Power%20Apps%20to%20achieve%20this.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERob%3CBR%20%2F%3ELos%20Gallardos%3CBR%20%2F%3E%3CFONT%20size%3D%222%22%20color%3D%22%23333399%22%3EMicrosoft%20Power%20Automate%20Community%20Super%20User%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hello, I was wondering if it is possible to create form that displays dynamic number of controls based on user answer. Maybe example of what I'm trying to achieve will make things more clear.

 

Lets assume that I want to create form that allows user to provide some "ideas". The single "idea" consists of 2 properties: name and description. Upon entering the form user is asked, "how many ideas would you like to submit" and he can answer that question with a number between 1 - 10. Based on number provided by the user I would like to display dynamic number of fields where user can provide his answers. For example user enters 3 in number of ideas field, and form looks like this:

 

Number of ideas: 3

Idea 1

Name: .........

Description: .........

Idea 2

Name: .........

Description: .........

Idea 3

Name: .........

Description: .........

 

If user changes the values of number of ideas field, the form updates automatically to display provided number of fields.

 

Thanks in advance for any help :)

 

 

 

6 Replies
best response confirmed by dex2l (New Contributor)
Solution

@dex2l there is nothing in Forms that enables you to do that.

 

Rob
Los Gallardos
Microsoft Power Automate Community Super Use

@RobElliottThank you for your answer, unfortunately I expected that. One last thing. Please confirm if I understand this correctly. The number of fields/inputs on form is fixed and there is no way to dynamically add/remove anything to the form based on user input? I know about branching feature but doesn't fit my needs.

@dex2l you are correct, the number of questions is fixed and there is no way to dynamically add or remove anything based on a user's answer. You'd have to create an app in Power Apps to achieve this.

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User

Yes you can.

 

You may use Branching and achieve the requirement.

The only hiccup in this way is that you need to create 10 Sections with respective number of Fields

Eg: Section 5 will be having Forms elements to enter 5 Ideas, Section 6 will be having Forms elements to enter 6 Ideas, Etc.

Once you done this, Just enable branching and then select appropriate flow of sections to achieve the result

My idea would be to create 10 idea fields by default, then send the user to the desired idea field by the choice they make.

Example:
If the user selects "I want to enter 1 idea" => Send to the 10th (last) idea form element.
If the user selects "I want to enter 4 ideas" => Send the user to the 6th idea form element.
If the user selects "I want to enter 9 ideas" => Send them to the 2nd idea form element.
and selecting 10 would send them to the first idea form element.

This way, they will end up with enough fields to enter the amount of ideas they selected in the first question.
Yes with branching that would be do-able without any problem.