Looking to be pointed in the right direction/ the right terminology to search to keep more information. I’m thinking of having a collection that has fields for different steps and pulling the field content into a page so that each time the ‘Next’ button is clicked, the content will get replaced with the different field content.
I know I will need to use custom code and javascript - I’m just not sure what terms I need to be searching for to find out how to implement something like this or any resources that would be helpful to look at. Any help would be greatly appreciated!
Hi @emmac I believe there’s a better, simpler approach for you.
If you create 4 CMS Collections, you’ll also get 4 associated CMS Template Pages automatically created for you.
What’s awesome about these CMS Template Pages is that you can get the field values out of the CMS Collection that it’s associated to and display it on the page.
So in your example, the “Step Two” page would have access to all of the “Step Two” CMS Collection items and its field values.
Hey @ChrisDrit - thanks for your response! I probably should have explained myself better - I was trying to make the situation more understandable but in reality I’m looking at around 15 steps, not 4. So not sure if this would work! If only I could keep it at 4
Essentially what I think your need to do is have the elements hidden (a collection list with 15 rich text fields for example) on the page you want to display the steps on. Using JavaScript or Interactions you could toggle the visibility of elements on a button click thus revealing the steps. Personally I think an accordion might be a better model since it works well with mobile (stacked content).
@mikeyevin Just jumping onto this as I have a similar problem. I’m creating something where each time you click a button it will display copy from a field in a CMS collection.
I got it to work with javascript when the field was a plain text field as I could select the field in the custom code.
However I decided that I wanted to be able to style some of the copy by having some words in bold. However when the field is rich text I’m unable to select it in the custom code.
At the moment I’ve played with Javascript only a bit and when I click the button I can go from my Method Step 1 to Step 2 with the plain text. Which is great and I know with more thought I can have the button click run through each of the steps in the method collection. But I would prefer to be able to do this with a rich text field so that I can format each step to highlight specific words.
Hi @webdev - sorry didn’t mean to do that. I was in two different discovery phases and was looking at the other thread as more specific to the problem I had with Rich Text Fields.