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

Shaun Taylor
Shaun Taylor
2,654 Points

Wordpress and Contact Form 7 (pre-populating fields)

Hi, if anyone can help - I'm trying to pre-populate a field from a previously submitted form

I have this site up and running http://seedcreativehub.co.uk and in the yellow 'A SPACE FOR...' box, someone enters what they would like to use the space for... they then get redirected to a larger form which has the same question repeated... I'd like it to be pre populated wight he info they just typed in on the first form...

Any ideas? If this can't be done with Contact form 7 - Could anyone suggest abetter way to complete the process? Submit text - go to next page - text submitted pre pollutes one field...

It seems like it should be something simple, but I can't figure it out.

Really appreciate any help you can give me.

Thanks for your time,

Shaun

2 Answers

Shaun Taylor
Shaun Taylor
2,654 Points

Hi John,

Thanks very much for this - I have looked at that plugin, and I still can't figure out how it will do exactly what i want tot to do.

It will need to pre-populate the field with the info which has been submitted in a separate contact 7 contact form.

I even tried posting on the support forum for this plugin, but I haven't heard back - so I came to here to see if anyone can advise.

While I agree, in a learning environment it might be counterproductive to directly show someone rather than lead them there... At the moment I really need to get this working as the deadline is looming and I don't understand what I'm supposed to do from reading the plugin instructions... SO perhaps someone showing me what to do precisely will help me understand how it works and get to grips with it...

Hope you can help,

Thanks again and thanks for your time, John :)

Shaun.

Ivailo Ivanov
Ivailo Ivanov
784 Points

I'm looking for the same solution if anyone could assist that would be great!

John Steer-Fowler
PLUS
John Steer-Fowler
Courses Plus Student 11,734 Points

Hi Shaun,

While it would be counterproductive for me to tell you exactly how to do this, I can help by pointing you in the right direction.

Unfortunately Contact Form 7 only features static values, which means that you would not be able to achieve your requirement.

Thankfully, someone had the same idea as you, and they released an extension of Contact Form 7 that allows you to use Dynamic values, allowing you to achieve your requirement called Contact Form 7 Dynamic Text Extension.

You can find it here: Contact Form 7 Dynamic Text Extension

Give this a read, and you might be able to find what your looking for.

Good Luck, keep me updated with your project, it looks good :D