Conditional logic in Webflow?

Hi, i’m trying to decide if i go with Webflow or Wordpress for a project i’m working on for a school.
Webflow would be absolutly perfect for everything but a small part would require some conditionnal logic. I have to integrate a text with holes in it where a student would have to fill the holes with the right words. At the end, the form would tell the student how many right or wrong answers the student had. I guess it’s a pretty simple thing and i would have no problem finding a Wordpress plugin for the task but i’d reallly like to find a (preferably free) solution to use in Webflow.

Any idea?

There’s no such feature in Webflow yet.

@zbrah is looking to achieve almost the same behavior for lmost the same goal (student thing). @zbrah where do you stand on this?

Maybe you could find a JS that would do that, or a third party service and be able to integrate it into Webflow?

1 Like

@Yannick_Duguay , @vincent is correct in that there is no native feature in Webflow, but it would be relatively simple to create with custom code.

The only caveat would be that the feature would be hard-coded. This means that you can program the test and answers, however if you ever want to change/update anything you would need to go directly in the code to do this. If the test will be pretty static and unchanging then this should work fine, however if this is something you will need to continually update you may be better off using a 3rd party service that gives you an embed code that you could place in Webflow.

Lastly, since the code would be front-end code and on the browser, students could technically find the code and answers if they have the technical know-how.

Please let me know of any questions!

2 Likes

Which should end up with them getting a better grade, right? right? :smiley:

1 Like

Hi, thank you for your answer. I guess the best would be to get someone to code the part since i don’t think it will change over time. I just need to find the right person for the task since i’m not sure i want to learn PHP right now :wink:

Javascript would be the best option for that knid of thing? Can you suggest a forum or website where i could ask my question about a JS code that would do that or a place where i could learn to do it?

hey @Yannick_Duguay if you want to write the code yourself, it actually would have to be javascript. PHP is a server-side code, and Webflow doesn’t allow you to touch the server side code.

Javascript is the only code that you could embed in Webflow since it is not executed on the server, but rather directly in the browser.

If you’d like some specific help with his feel free to send me a private message.

Hope this helps!

Honestly your best bet would be to create the form in a separate, third party form app and then embed it into your Webflow page. Both typeform (awesome, expensive) and cognito (awesome, cheap) render form inputs with the kind of logic you’re looking for (I’ve made forms like the one you’ve described using both). You could have the email notify the same address you’re using now.

Potential downside is that all your entries become records in those apps, not as entries in your webflow account. But they’re simple to export as needed; alternatively, you could hook up a Zap to pass along the data any time a new entry is recorded.

Hope this helps!

1 Like

In fact i don’t need to collect data. The only thing i need is that the website tell the user how many right answers there is and where are the errors. It’s just to help the students test their knowledge themselves. I’ll see if Cognito could be an option. Thanks.

Not necessarily so. Answers could also be inserted/changed via custom attributes on the text field as well. If done right, no editing of custom code is necessary for changes to questions!

@Yannick_Duguay check Google Forms out. Seems like it does what you need.

Made quiz form for you to test out :grinning:
https://docs.google.com/forms/d/e/1FAIpQLSexvIom3OFa6YI6CcBPCEbrzT9Y4GIbL2xpfW3SjVXVO7sGjQ/viewform?usp=sf_link

1 Like

Yes it’s pretty much what I’m looking for. Problem is that i have to Integrate that in Webflow and I’m not sure about the kind of control I would have on the way it behave and look. Thanks for suggestion, appreciate it.

1 Like

It is possible to customize a google form inside Webflow, simple forms anyway. I don’t know if this quiz is possible though.

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