Conditional logic for CMS fields

I have a question about conditional logic for CMS. I have a client that runs intensive trainings, short courses and workshops. I have setup option field for course type but I would like to have the option to show as the second option to show a list of the names of the relevant courses for previously chosen course type. For now, I have three option fields for each type. There is more logic going on I have sorted but this will help (to the client). Is possible to implement custom JS for CMS to make it happen? If yes where I have to look to get some info. API? Thanks


Here is my public share link:
(how to access public share link)

Hi Stan, I use this: https://cmsdocs.webflow.io/#filter
Let me know if you need help or if this is what you are looking to do.

Thanks a lot Tim. Now I have something extra to do and discover over this weekend. I need to do some Webflow JS exercises to get more comfortable on JS logic implementation. I do JS in VSCode but I do not know how it works (error check, clog etc…) on this platform. Any suggestions for some videos with this topic. I know that Webflow have a section for JS code but I’m more about how to debug on this platform etc. Or only option is Dev tools? :wink:

I would suggest doing it the old fashioned way. I think Webflow gives the impression that you do not need to know how to code to use the designer. That’s simply not true, and yet it is. The designer is a visual code editor, that’s it. Everything we do on there has raw HTML and CSS being written and manipulated visually, which is great, but people have ideas that exceed their knowledge of how websites work; that in the end only raw code can handle, Webflow just does it better.

You can write JS code in the page settings, and it does check for simple things like changing the color of a variable call if its spelled wrong, but they straight up tell you at the bottom of the code window that it wont debug it. The only reason I had to reference the JS from Finsweet externally is because the code window has a limit of 10,000 characters, and their code is over 111,000.

Each element has a custom attribute and a class which is what they used to hook the JS code to the elements, so if you know how to write JS you should be able to do it this way, unless it someday becomes a standard feature. They also have a crapton of integrations here: Webflow integrations | Webflow University Some of them are pretty interesting.

1 Like