Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Saving registered member responses on page WordPress

I have a membership site where we'd like to add questions in the content, with text boxes for users to give answers.

The site is already set up as a membership site, so what I'm wondering is, is it possible for each member to answer questions and have them saved on-page (via ajax - and written to the database) so that upon returning to that page each member will see (and be able to update) their own answers?

I was using the [[LINK href="http://www.learndash.com/"]]learndash[[/LINK]] plugin to set this up but saving the answers on the page for each user doesn't seem possible with that plugin, and that's the key feature my client wants.

I'm not looking for specific code yet, just whether or not this is possible and if so how I might go about it, either by specific plugins or custom coding.

Here is a visual to help clarify what I'm looking for.

Answers (4)

2015-01-06

timDesain Nanang answers:

you can try this one:
https://wordpress.org/plugins/dw-question-answer/screenshots/

review:
http://www.wpbeginner.com/plugins/how-to-create-a-question-and-answers-site-in-wordpress/


Mike Sewell comments:

Hi Tim, Thanks I came upon that plugin as well but it's not quite what we're looking for. Rather than an open question and answer page where people vote, I'm looking for the ability to have each individual user see only their specific answers.

2015-01-06

Romel Apuya answers:

you can customize the plugin..
remove the voting feature and restrict user to only see his answer to the question...

i can help with code customization..


Mike Sewell comments:

Hi Romel, thanks for your response. Would that idea work to have multiple questions on the page? Also, any idea if those questions and answers could then be exported by CSV in bulk?


Romel Apuya comments:

you can customize the plugin..
remove the voting feature and restrict user to only see his answer to the question...

i can help with code customization..


Romel Apuya comments:

i think yes.. but i havent tested that plugin if it has CSV import..

2015-01-07

John Cotton answers:

Given your fairly specific needs, I'd code it (probably with ajax, but that's a presentational thing).

Easy enough to do:

* Some front-end HTML and javascript
* Ajax postback
* Server side code to store in the database (see below)
* Front-end JS can retrieve on load and redisplay

If there is only ever one set of questions for each user, I'd be inclined to store as meta in the user meta table (with the array of answers serialized into a single row assume you don't plan on too many database manipulation needs).

2015-01-07

Ryan S answers:

Hi Mike,

Yes it's very possible, though I didn't find any plugin that can do this one, here's my idea based on experience on the coding.

1. All fields are mark as array, e.g. question[] and answer[]
2. In your database you can create custom table that say question and ansqer and in question table you added foreign key to corresponding questions.
2.a. or simply single table with both question and answer fields in there (straight fields creation)
3. Upon saving answer and question to DB you would simply syncronize and unsencronize to display data.


Hope that helps