A questionnaire-like sequence of forms implementation

This is a concept I’m working on. I’m trying to figure out the best implementation approach so no visual code exists now.

The concept is,

  • that there will be a set of forms predefined by the admin.
  • the sequence of the form is not fixed, it’s dynamic. Let’s assume there are 5 forms (a, b, c, d, e), and the current sequence is a ↔ c ↔ e. But it can be b ↔ d ↔ e next time. In a word the sequence isn’t fixed, it will be dynamically set by the admin.
  • the sequence will also implement logic. Like based on user selection in the form ‘a’ the next form will come up.

The approach so far I have taken,

  • Used Django Fobi extension to create forms. In Fobi, the admin can create forms with custom fields on the fly without handling Models.

The stage I’m stuck now,

  • Forms are created, but how I may implement the sequence of forms?

Will Django River-Admin help in this case? I research on River-Admin and I see it’s being used for the workflow of state most of the time, haven’t got any reference where River-Admin is used to control the flow of forms.

I’m searching for suggestions (based on the current state I’m in Or a better new approach). Thanks :slight_smile:

Take a look at the Django FormWizard and see if that will work for you. (That’s what we use.)

Thanks @KenWhitesell

I will check it. Are there more options to research here?

Regards,
Omar

Maybe. When I’m looking for third-party packages for Django, I always start with djangopackages.org.

Thanks @KenWhitesell

@KenWhitesell it’s a long time passed on this thread. I turned this concept into a feature and it’s working well!

Now I need to use the translation feature in this form. As the forms are dynamic and I can’t make .po & .mo translation files each time the admin creates a form. Is there any better way to change the language of the forms (in fact the whole app, as I am collecting users’ language preferences during registration and storing them in local storage as well as in the Django model)?

Any suggestions will be appreciated. Thanks.

fobi has form-wizards implemented. However, in fobi wizards have a distinct order. There are ways around it, though (too long to explain, but doable).