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


Celeste Nonis
Celeste Nonis
6,287 Points

Can/How do I create a 10 questions survey on my website? One question per web page.


I would like to know if it's possible to create a survey on my website to evaluate my value proposition and customer segments (one question per web page), instead of using the boring survey templates provided online.

If possible, how do i collect the data? How do I code such that the data is for instance sent to an email address?

Many thanks, Celeste

2 Answers

Yes, you can do this with PHP. You save the data in a mysql Database and a cronjob will send you the collected data once a day. Please ask if you need further help.


Part 1

Celeste Nonis
Celeste Nonis
6,287 Points

Thanks Philip! will read up more and give it a try!

Hi Celeste, if you are using WordPress then you can use a plugin called Gravity Forms. With Gravity Forms, everything is done for you and you can segment the forms and split them into individual pages using conditional logic ( If form field A is completed, then show page 2 for example) and you can have all submissions go to any email address you specify, or as Philip mentioned - direct to a database for CSV export.

I've used GravityForms to study the code and see how things work and it's pretty good. If you don't have WordPress, better polish up on your php!