Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support conditional logic #358

Open
ei8fdb opened this issue May 6, 2020 · 17 comments
Open

Support conditional logic #358

ei8fdb opened this issue May 6, 2020 · 17 comments
Labels
1. to develop Accepted and waiting to be taken care of enhancement New feature or request feature: 📑 form creation usability test Issues which came up in the usability testing session by Ura Design
Milestone

Comments

@ei8fdb
Copy link

ei8fdb commented May 6, 2020

Is your feature request related to a problem? Please describe.
No it's not.

Describe the solution you'd like

Like if you answered yes to question A, you go to question B otherwise question C ?

Describe alternatives you've considered
There's not real alternative as there is no logic supported currently.

Additional context
I'm a UX researcher and use creating long, or complicated questionnaires a lot. Being able to use conditional logic allows to direct the user down pre-defined paths is very important for me.

I understand this might be complicated/a lot of work to implement. There's also a lot of ways to implement this so I think it requires time to discuss.

If there is a possibility of this being implemented I can give lots of context!

@ei8fdb ei8fdb added 0. Needs triage Pending approval or rejection. This issue is pending approval. enhancement New feature or request labels May 6, 2020
@skjnldsv
Copy link
Member

skjnldsv commented May 6, 2020

#227 ?

@ei8fdb
Copy link
Author

ei8fdb commented May 6, 2020

More like your answer in that issue.

You would like conditional question? Like if you answered yes to question A, you go to question B otherwise question C ?

Would you like me to close this and discuss it over there? I thought it was different enough that it warranted a separate issue.

@skjnldsv
Copy link
Member

skjnldsv commented May 6, 2020

I guess this is what it's about, yeah 🤔
Not super clear though. 🙈

@jancborchardt
Copy link
Member

jancborchardt commented May 6, 2020

Since it is about different use-cases, I would also consider this separate.

That is, right and wrong answers are for quizzes. Conditional logic is for when you want to skip entire sections. Different things.

@jancborchardt jancborchardt added this to the 4.0 milestone May 6, 2020
@jancborchardt jancborchardt added 1. to develop Accepted and waiting to be taken care of and removed 0. Needs triage Pending approval or rejection. This issue is pending approval. labels May 6, 2020
@jancborchardt jancborchardt modified the milestones: 4.0, 3.0 Jun 12, 2020
@funkyferdy
Copy link

funkyferdy commented Aug 7, 2020

im a TYPO3-dude, many things you are discussin here, i allready seen in a TYPO3 Extension called "powermail" and "powermail_cond". take a look here for "inspiration" how something could look like: https://docs.typo3.org/typo3cms/extensions/powermail_cond/stable/Records/Index.html and https://github.com/einpraegsam/powermail/tree/develop/Documentation resp. https://github.com/einpraegsam/powermail/blob/develop/Documentation/ForEditors/AddNewForms.md

Sorry, stumbled just across nexcloud-forms and it looks very very promising! Including the planed milestones - but maybe no need to reinvent the wheel when we talking about "forms".

@trojanobelix
Copy link

Google forms does it perfect:

1 Question: Do you like to have coloured cards?
Yes
No
2, (only on "Yes") Choose colour:
red
yellow
green
3. Thanks for your answer

@jancborchardt jancborchardt added the usability test Issues which came up in the usability testing session by Ura Design label Jun 11, 2021
@JDPDO
Copy link

JDPDO commented Aug 5, 2021

Several days ago I've started working on an attempt to implement support.

I use the example @trojanobelix metioned as template.

@ei8fdb
Copy link
Author

ei8fdb commented Aug 5, 2021

@JDPDO Interesting. Is there anywhere we can try it out?

@JDPDO
Copy link

JDPDO commented Aug 5, 2021

The frontend needs a change for the prerequisite implementation. A kind of selection window is needed for choosing a prerequisite Option.

To change the frontend properly and only do it once: Which alternative you like the most?

First option (🎉 reaction): using a AppSettingsDialog

image

Or second (🚀 reaction): using the AppSidebar similar to the sharing sidebar of the app.

image

Both options with some kind of question selection tree. Or do you have other proposals? (reaction 👀)

@JDPDO
Copy link

JDPDO commented Aug 5, 2021

@JDPDO Interesting. Is there anywhere we can try it out?

If started a fork. See https://github.com/JDPDO/forms. It is to early to test it properly yet. Just wanted to let you know.

@ei8fdb
Copy link
Author

ei8fdb commented Aug 5, 2021

Thanks for posting the screenshots. They're very helpful.

Both options with some kind of question selection tree. Or do you have other proposals?

Can I suggest you add maybe 👂 as an emoji to vote for "other proposals"? :)

Other proposal
My preference would be to have something like Google Forms, visible in the page, like so:

Screenshot 2021-08-05 at 11 06 46

The reasoning being for efficiency, and reducing the number of clicks and movement for the user. When making a survey it can take anything from 20-30 minutes to many hours, particularly when changing the design of the questions, etc. This translates into lots of clicks, etc so trying to reduce that would be good for the user.

Would you like me to give more explanation/info?

@JDPDO
Copy link

JDPDO commented Aug 5, 2021

Can I suggest you add maybe as an emoji to vote for "other proposals"? :)

Nice idea but:
image 😔

My preference would be to have something like Google Forms...

I like that idea. 😀 Google does it like (check this and go to that)-Style. They doing something like referencing between sections or from options to sections. Maybe we should keep #624 in mind too.

I thought more of: Which conditions have to be true, that this question or option gets enabled? Think this is more extendable in the future. Maybe for questions depending on specific values of text- or date-options.
What do you think? Is this better or worse?

The way they referencing conditions without extra option windows is nice 👍. I will keep that in mind. Good point with the clicks.

Would you like me to give more explanation/info?

Hope I have got you right.

@ei8fdb
Copy link
Author

ei8fdb commented Aug 5, 2021

Can I suggest you add maybe as an emoji to vote for "other proposals"? :)

Nice idea but:
image 😔

Yes I saw that. Can I suggest 👀 instead?

My preference would be to have something like Google Forms...

I like that idea. 😀 Google does it like (check this and go to that)-Style. They doing something like referencing between sections or from options to sections. Maybe we should keep #624 in mind too.

Google Forms works only if pages are treated as sections - when you skip a question, the UI only shows you a webpage, with the questions in that section.

This is how crowdsignal treats questions, pages, and conditional logic:

image

image

image

I've thought alot (probably too much to be honest!) about forms creation. I make surveys/polls/forms daily. I'm working on a project at the moment that is, basically a form builder.

I created this visualisation of "the anatomy of a form" to communicate to colleagues the information architecture of a form.

The anatomy of a form - The anatomy of a form

Right now NextCloud Forms is at position 1, i.e. 1 page, multiple questions.

#624 is talking about position 3/4. Adding sections is useful, but (IMO) isn't as useful as adding pagination (i.e. splitting the form over separate pages)

To improve readability we'd need to get to position 5 - pagination. Conditional Logic is most useful for pagination.

We often want to add all the things(!) and it often ends up making it overly complicated. :)

I thought more of: Which conditions have to be true, that this question or option gets enabled? Think this is more extendable in the future. Maybe for questions depending on specific values of text- or date-options.
What do you think? Is this better or worse?

I think I understand what you mean and, just my opinion, that seems more complicated than saying "continue unless these [X] conditions.

In my mind form conditional logic is just a bunch of if, then, else statements. If there's no if or then statements, then you just continue. And (I think) that's how most form conditional logic works. (I could be wrong!)

The way they referencing conditions without extra option windows is nice 👍. I will keep that in mind. Good point with the clicks.

Would you like me to give more explanation/info?

Hope I have got you right.

Yep you did! :)

I hope this is helpful.

@JDPDO
Copy link

JDPDO commented Aug 5, 2021

Yes I saw that. Can I suggest instead?

Done. 😉

Google Forms works only if pages are treated as sections - when you skip a question, the UI only shows you a webpage, with the questions in that section.

Conflicting Forms (Try, are only 3 steps) are possible. If google forms encounters a conflict which section to display next it goes with the last selected redirect. The second section/page is not displayed if opposite is chosen in question named _2 even if a redirect to section two is set in question named _1.

This program behavior should be avoided by us.

This is how crowdsignal treats questions, pages, and conditional logic

Switching tabs (Questions - Branching) for editing should we keep in mind.

I created this visualisation of "the anatomy of a form" to communicate to colleagues the information architecture of a form.

Like it. 😃 Now the form terminology is clear.

We often want to add all the things(!) and it often ends up making it overly complicated. :)

😆 You're right.

I think I understand what you mean and, just my opinion, that seems more complicated than saying "continue unless these [X] conditions.

The benefit of saving the conditions to the depended following question would be, that a question can depend on multiple preceding questions. The other way around, this will be more difficult. But do we need that really?

In my mind form conditional logic is just a bunch of if, then, else statements. If there's no if or then statements, then you just continue. And (I think) that's how most form conditional logic works. (I could be wrong!)

Agreed. One problem remains: Which question got the condition?

argumentation

implement ... ... condition at preceding question condition at following question
conflicts possible if sections are added ✔️
multiple conditions ✔️
➕ simple programming ✔️
➕ workflow ⚠️ The following question is at creation time not available. Or the following question have to be defined before. ✔️ straight forward working
➕ exports to other tools ✔️ seems to be common ❌ multiple conditions could make this impossible or very unpleasant.
ℹ️ point in time check condition, then redirect immediately to following question check conditon, when should display

➕ : undiscussed
ℹ️ : comes along with...
✔️ : pro
❌ : con

@JDPDO
Copy link

JDPDO commented Aug 5, 2021

Moment: The chosen data schema would support both approaches. It should not be to hard to implement both in different branches. See optionId and conditionOptionId in Prerequiste Entity of currently implemented schema.

@Thatoo
Copy link

Thatoo commented Jul 3, 2023

Any update on this issue since two years ago when @JDPDO started a great job on it?

@johnnyq
Copy link

johnnyq commented Oct 4, 2023

We are wondering about this feature as we are currently using Microsoft Forms on Microsoft 365 which already supports this. This feature alone is holding a few of our clients back from switching. We were wondering if there an ETA even if it is 2 or more years from now.

@Chartman123 Chartman123 modified the milestones: 4.0, 4.1 Nov 28, 2023
@Chartman123 Chartman123 modified the milestones: 4.1, Maybe someday Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of enhancement New feature or request feature: 📑 form creation usability test Issues which came up in the usability testing session by Ura Design
Projects
None yet
Development

No branches or pull requests

9 participants