Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Ravi Kaul
Ravi Kaul
1,372 Points

How would you do this (saving variables on WP)?

Ok so someone else was working on this and foolishly I've said I can help - had a closer look at the code and it's a total mess!

So there are six 'packages' on my site. When the user selects one it takes them to a page I've designed for each one. Let's say they click on 'package 1'. What I would like is to save a variable price let's say '100'.

On the next page is a form with optional extras where they can pick and choose from option boxes. The form then totals up the optional extras and saves into another variable optionalextras let's say '50'.

They hit next and they get another form which they need to fill with address details, name etc.

Hit next and then they get a summary of the variable price, variable optionalextras and a total price.

What's the best way to achieve this? The previous person working on it decided to save everything into the WP database for some reason! I'm thinking either session variables or maybe there's a plugin which can handle this nicely? Any help would be much appreciated.

Thanks

1 Answer

Kevin Korte
Kevin Korte
28,149 Points

Sounds like just a standard multistep form in Wordpress.

I think this is the go-to form builder for wordpress, but it costs money: http://www.gravityforms.com/

Otherwise, I'm sure there are some free options, or best practice blog articles for building a mutistep form in Wordpress, and I'd follow that technique.