Discussion:
[GSoC 2014] Proposal for a forms/survey plugin
Shitiz Garg
2014-03-08 20:12:52 UTC
Permalink
Hello! I hope everyone is doing well, I've worked up an initial draft for a
forms/survey plugin and would like some feedback. Thanks

https://drive.google.com/file/d/0B54RQBAnlES-WWlmYk9QR2kzTGs
Ian Dunn
2014-03-10 19:12:02 UTC
Permalink
Post by Shitiz Garg
Hello! I hope everyone is doing well, I've worked up an initial draft for a
forms/survey plugin and would like some feedback. Thanks
Thanks Shitiz, that looks pretty good :)

Here are a few things to refine:

* Advanced field types and stats are nice, but not necessary for the
first version. They can be added if there's time after the core
components are finished.

* Question branching is a must-have feature. (e.g., the user is asked an
additional question depending on how the answered a previous question).
That's probably similar to the conditional field logic you mentioned.

* Pre-defined forms is a must-have feature (e.g., a base "call for
speakers" form that can be customized and added on to by each admin)

* Another must-have feature will be automating some actions for certain
forms. For example, when a potential speaker submits the Call for
Speakers form, the should automatically have a Speaker post created and
set as a draft. That way the WordCamp organizers won't have to
copy/paste the data from their submission into a Speaker post.

Since the plugin should be generic enough to live in the WordPress.org
plugin repository, features like this that are specific to WordCamp.org
would probably be implemented as a second plugin, and the base plugin
would simply provide the necessary custom hooks to allow the second
plugin to integrate with it.

* See the original idea posting and past wp-hackers threads for more
details on other must-have features

* Order/pricing isn't relevant to WordCamps. They're not-for-profit
events and the only thing attendees purchase is a ticket, which is
handled by the CampTix plugin.

* Role-based fields and form limitations probably wouldn't be necessary
for the first version.

* Form fields should be added through a UI rather than shortcodes. We'd
only want a shortcode for the form itself. See previous threads on
wp-hackers for a discussion about that.

* Each form will be a post, and the fields and other data will be stored
as postmeta. Same for responses.
Shitiz Garg
2014-03-10 19:47:01 UTC
Permalink
Hello! Thanks for the feedback

* Question branching is a must-have feature. (e.g., the user is asked an
Post by Ian Dunn
additional question depending on how the answered a previous question).
That's probably similar to the conditional field logic you mentioned.
Yes, that was mostly the intention of conditional field logic, I'll move it
up to must-haves.
Post by Ian Dunn
* Pre-defined forms is a must-have feature (e.g., a base "call for
speakers" form that can be customized and added on to by each admin)
So, these will basically be like form "templates" which auto-fill when new
form is being created?

* Another must-have feature will be automating some actions for certain
Post by Ian Dunn
forms. For example, when a potential speaker submits the Call for Speakers
form, the should automatically have a Speaker post created and set as a
draft. That way the WordCamp organizers won't have to copy/paste the data
from their submission into a Speaker post.
Since the plugin should be generic enough to live in the WordPress.org
plugin repository, features like this that are specific to WordCamp.org
would probably be implemented as a second plugin, and the base plugin would
simply provide the necessary custom hooks to allow the second plugin to
integrate with it.
I agree, this can be done fairly easily as a sub-plugin that auto-posts any
form submissions. I had something similar in mind but wasn't sure it'll be
a requirement
Post by Ian Dunn
* See the original idea posting and past wp-hackers threads for more
details on other must-have features
One feature that I probably missed was auto-filling forms from previously
stored data. From what I understand, the requirement is to fill, say a
"Call for Speakers" form with the data that the user has already filled in
a previous form?
Post by Ian Dunn
* Order/pricing isn't relevant to WordCamps. They're not-for-profit events
and the only thing attendees purchase is a ticket, which is handled by the
CampTix plugin
Ah okay, I can save this for a future side-project if this takes off.

* Form fields should be added through a UI rather than shortcodes. We'd
Post by Ian Dunn
only want a shortcode for the form itself. See previous threads on
wp-hackers for a discussion about that.
* Each form will be a post, and the fields and other data will be stored as
Post by Ian Dunn
postmeta. Same for responses
I see, that'll probably allow for more robust processing of forms.
Basically, store the form as a post but store the fields, field's meta etc.
as postmeta, same for responses. Actually this solves a lot of processing
problems I had when thinking how to statistical queries, if required down
the road. Responses can be stored as <post_id>, form_<field_name>_response
which I can then query to gather totals etc. Thanks!
Ian Dunn
2014-03-11 16:42:36 UTC
Permalink
Post by Shitiz Garg
Post by Ian Dunn
* Pre-defined forms is a must-have feature
So, these will basically be like form "templates" which auto-fill when new
form is being created?
Right. When a user creates a new form, it would start out blank, but
there would be a dropdown list of pre-defined forms. The pre-defined
forms will probably be created via a filter callback in the sub-plugin.

If the use chooses a form from that list, then the form that they're
creating will be based on the pre-defined form they chose, and will
inherit the fields, etc. They can still customize the new form to add
extra questions, etc.

The purpose of this is to make it easy to quickly create common forms,
and also to have some standardization to them across WordCamps, while
still allowing enough flexibility to let organizers make it fit their
individual needs.
Post by Shitiz Garg
One feature that I probably missed was auto-filling forms from previously
stored data. From what I understand, the requirement is to fill, say a
"Call for Speakers" form with the data that the user has already filled in
a previous form?
It's the other way around. When a potential speaker fills out the Call
for Speakers form, the results of that would be stored in a response
post like any other form, but there would be some additional logic in
the sub-plugin that would also create a drafted Speaker post.

On WordCamp.org we have custom post types for Speakers, Sponsors,
Organizers and Sessions. e.g.,

http://2014.atlanta.wordcamp.org/speakers/
http://2014.atlanta.wordcamp.org/sponsors/
http://2014.atlanta.wordcamp.org/sessions/
http://2014.atlanta.wordcamp.org/organizers/

Currently when a potential speaker submits a Call for Speakers form, the
results are e-mailed to the organizers, and they have to copy/paste the
data into a the Speaker post. We just want to automate that process for
them. The speakers would all have a 'draft' status to start with, and
then the organizers can publish the speakers that they've chosen to accept.

The code for the custom post types is in the meta.svn.wordpress.org
repository if you want to take a look or install it on your local
environment.
Shitiz Garg
2014-03-12 17:10:57 UTC
Permalink
Hello, I revised the proposal a bit, any feedback is appreciated.

https://drive.google.com/file/d/0B54RQBAnlES-T2FuLXg3bE02aDQ/edit?usp=sharing
Post by Ian Dunn
* Pre-defined forms is a must-have feature
So, these will basically be like form "templates" which auto-fill when new
form is being created?
Right. When a user creates a new form, it would start out blank, but there
would be a dropdown list of pre-defined forms. The pre-defined forms will
probably be created via a filter callback in the sub-plugin.
If the use chooses a form from that list, then the form that they're
creating will be based on the pre-defined form they chose, and will inherit
the fields, etc. They can still customize the new form to add extra
questions, etc.
The purpose of this is to make it easy to quickly create common forms, and
also to have some standardization to them across WordCamps, while still
allowing enough flexibility to let organizers make it fit their individual
needs.
One feature that I probably missed was auto-filling forms from previously
Post by Ian Dunn
stored data. From what I understand, the requirement is to fill, say a
"Call for Speakers" form with the data that the user has already filled in
a previous form?
It's the other way around. When a potential speaker fills out the Call for
Speakers form, the results of that would be stored in a response post like
any other form, but there would be some additional logic in the sub-plugin
that would also create a drafted Speaker post.
On WordCamp.org we have custom post types for Speakers, Sponsors,
Organizers and Sessions. e.g.,
http://2014.atlanta.wordcamp.org/speakers/
http://2014.atlanta.wordcamp.org/sponsors/
http://2014.atlanta.wordcamp.org/sessions/
http://2014.atlanta.wordcamp.org/organizers/
Currently when a potential speaker submits a Call for Speakers form, the
results are e-mailed to the organizers, and they have to copy/paste the
data into a the Speaker post. We just want to automate that process for
them. The speakers would all have a 'draft' status to start with, and then
the organizers can publish the speakers that they've chosen to accept.
The code for the custom post types is in the meta.svn.wordpress.orgrepository if you want to take a look or install it on your local
environment.
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Ian Dunn
2014-03-12 19:33:25 UTC
Permalink
Post by Shitiz Garg
Hello, I revised the proposal a bit, any feedback is appreciated.
https://drive.google.com/file/d/0B54RQBAnlES-T2FuLXg3bE02aDQ/edit?usp=sharing
That looks great :)

Let me know if you have any other questions or need anything else.
Shitiz Garg
2014-03-13 20:27:36 UTC
Permalink
Thanks a lot! I'll submit this proposal by Friday evening
Post by Ian Dunn
Post by Shitiz Garg
Hello, I revised the proposal a bit, any feedback is appreciated.
https://drive.google.com/file/d/0B54RQBAnlES-T2FuLXg3bE02aDQ/edit?usp=
sharing
That looks great :)
Let me know if you have any other questions or need anything else.
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Ian Dunn
2014-03-13 22:02:48 UTC
Permalink
Post by Shitiz Garg
Hello, I revised the proposal a bit, any feedback is appreciated.
https://drive.google.com/file/d/0B54RQBAnlES-T2FuLXg3bE02aDQ/edit?usp=sharing
One more important note: I'd strongly recommend making sure that you're
available for the whole term, because it's common for projects to take
longer than expected or run into unforeseen obstacles. You're much more
likely to be successful if you can focus on the project for the full summer.
Shitiz Garg
2014-03-14 02:47:02 UTC
Permalink
That's not a problem, I probably worded my timeline incorrectly, but I am
available until end of term. I just won't be able to spend as much time as
I do when my break is on (I can put in almost 12-14 hours a day), but I
will be available for a few hours daily atleast after July second week.
Post by Ian Dunn
Post by Shitiz Garg
Hello, I revised the proposal a bit, any feedback is appreciated.
https://drive.google.com/file/d/0B54RQBAnlES-T2FuLXg3bE02aDQ/edit?usp=
sharing
One more important note: I'd strongly recommend making sure that you're
available for the whole term, because it's common for projects to take
longer than expected or run into unforeseen obstacles. You're much more
likely to be successful if you can focus on the project for the full summer.
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Loading...