Fwd: [GSoC - 2014] Introducing Myself

classic Classic list List threaded Threaded
24 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Fwd: [GSoC - 2014] Introducing Myself

Deven Bansod
Hi! I'm a student from India. I am interested in participating in Google
Summer of Code - 2014 with WordPress.
I want to take up the  "Forms Plug-in" project idea from the ideas page
[1]. Has there been any work on this? I guess that the idea would involve a
Plugin/Widget with a Settings Page to add new Surveys and Forms while also
providing the controls to edit the Saved surveys. Themes for the
Surveys/Forms and Other Complementary things can always be  added later. As
per my understanding, the project would require a good amount of PHP and
WP-based interaction with the MySQL Databases along with JavaScript and
AJAX for Data Validation.

Please correct me on this if I am wrong and advise me on how to get started
and get more acquainted with the community / development process.

- My background -
I have developed two simple plugins for Wordpress [2],[3] and have a fair
knowledge of the process. I have worked on several hobby projects with PHP,
MySQL, JavaScript, AJAX and Python [4]. I have also programmed in C and
Visual Basic and have a know-how of svn. I am on the
SSMS(Student Society For Mess Services)
 committee of my college, in which I'm responsible for developing and
maintaining a data oriented application to handle student billings. I was
also responsible for building a registration portal for an all-India event.

[1] http://codex.wordpress.org/?title=GSoC2014#Forms_Plugin
[2] http://wordpress.org/plugins/post-views-new
[3] http://wordpress.org/plugins/blog-tools
[4] http://github.com/devenbansod

--

* Thanks,Deven G. Bansod;*
* <[hidden email]>*
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: [GSoC - 2014] Introducing Myself

Ian Dunn
On 2/9/14, 10:46 PM, Deven Bansod wrote:
> I want to take up the  "Forms Plug-in" project idea from the ideas page
> [1]. Has there been any work on this?

Hi Deven, thanks for your interest :)

The forms project is something that WordCamp Central (the team that
organizes the global WordCamp infrastructure and WordCamp.org) has
talked about and wanted for a long time, but we haven't written any code
for it yet, so the student who works on it will be able to build it from
the ground up.


 > I guess that the idea would involve a Plugin/Widget with a Settings
 > Page to add new Surveys and Forms while also providing the controls
 > to edit the Saved surveys.

It would be a plugin and would most likely be created around Custom Post
Types.


> Themes for the
> Surveys/Forms and Other Complementary things can always be  added later.

It should be compatible with any theme, but that will mostly happen by
default. It will require some basic CSS rules to define the generic
layout of the forms on the front-end, but will inherit most of the
visual elements from whatever the current theme is.


> As
> per my understanding, the project would require a good amount of PHP and
> WP-based interaction with the MySQL Databases along with JavaScript and
> AJAX for Data Validation.

Definitely good amounts of PHP and the WordPress API, and also some
JavaScript. AJAX could be involved, but it wouldn't necessarily have to
be. You can check out the WordCamp Organizer Application to see the kind
of branching that happens based on how the questions are answered:

http://plan.wordcamp.org/become-an-organizer/organizer-application/

There probably won't be much MySQL (if any); at least not directly. The
WordPress API handles 99% of that for you. I'd recommend playing around
with custom post types to get a feel for it:

http://codex.wordpress.org/custom_post_type


> Please correct me on this if I am wrong and advise me on how to get started
> and get more acquainted with the community / development process.

Development for WordCamp.org happens on the Meta trac, and most of the
source code lives in the Meta repository. Other than that, the
processes, guidelines, etc are similar to the development of WordPress
itself.

Here's some links if you want to dig deeper:

WordCamps:

*
https://meta.trac.wordpress.org/query?status=accepted&status=assigned&status=new&status=reopened&status=reviewing&component=wordcamp.org&col=id&col=summary&col=status&col=owner&col=type&col=priority&col=component&order=priority 
- WordCamp.org tickets on the Meta trac
*
https://meta.svn.wordpress.org/sites/trunk/wordcamp.org/public_html/wp-content/ 
- The SVN repo for WordCamp.org code
* http://central.wordcamp.org/ - The home page for WordCamp.org
* http://plan.wordcamp.org/ - Documentation about WordCamps. Mostly
geared towards WordCamp organizers, but there's lots of helpful
background info in there.

WordPress development in general:

* http://wordpress.org/about/philosophy/
* http://make.wordpress.org/docs/plugin-developer-handbook/
* http://make.wordpress.org/core/handbook/


Thanks for your interest and good luck with your application. Let me
know if you have any other questions.
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: [GSoC - 2014] Introducing Myself

Deven Bansod
Hi Ian! Thanks a lot For Replying so nicely to all my queries!

I will surely go through the links that you have posted and see what I can
take up from there.

Meanwhile, I will state what I had in my mind.

1. A *Settings Page* where you will design the Form through a user friendly
interface like what we use while designing forms using Google Forms. (*Please
suggest if this will be possible to make in the Required Duration* ).

2. The Settings page UI, thus, will be used to make new *Forms with an
unique ID*.

3. The Plugin will have a function to generate *a short code* which will
have *arguments like the Form ID* etc.

4. The user can just go to the *'page/post'* that he wants to add the
survey and *use the Short Code with the right ID *as an argument and get
the survey running. !

Thanks,
Deven Bansod
* <[hidden email]>*
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: [GSoC - 2014] Introducing Myself

Ian Dunn
On 2/13/14, 11:41 PM, Deven Bansod wrote:
> 1. A *Settings Page* where you will design the Form through a user friendly
> interface like what we use while designing forms using Google Forms. (*Please
> suggest if this will be possible to make in the Required Duration* ).

That's the basic idea, yeah. It would actually be a custom post rather
than a Settings page, though.


> 2. The Settings page UI, thus, will be used to make new *Forms with an
> unique ID*.
>
> 3. The Plugin will have a function to generate *a short code* which will
> have *arguments like the Form ID* etc.
>
> 4. The user can just go to the *'page/post'* that he wants to add the
> survey and *use the Short Code with the right ID *as an argument and get
> the survey running. !

Yeah, that's all correct. There'll also be some features specific to
WordCamp.org, like supporting pre-defined base forms that organizers can
customize. For instance, a "Call for Speakers" form that potential
WordCamp speakers can fill out. It would have some standard fields like
Name, E-mail Address, WordPress.org username, etc, but then the
organizers could also add their custom questions to the form.

Another feature we're thinking about is having the results of certain
forms automatically populate some of our other custom post types. For
example, when someone fills out the Call for Speakers form, it could
automatically create a drafted Speaker post, so that the organizers
don't have to copy/paste the data between the two.

_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: [GSoC - 2014] Introducing Myself

Deven Bansod
Hii Ian!

Thanks a ton for being so patient and helping me understand the idea well.!

I want to get a clear idea of exactly what we are going to do ! So I keep
asking you more and more Questions while presenting my own ideas as well.
And here comes again !

*Please correct me if I am wrong in the Following Idea!*

The Basic Process of Making a New Form would be as follows :

1) Website '*Admin*istrator' will go to '*Forms'* in the main admin nav
menu -> Click on a '*Add New'* Form Button(Till this Its same as we do for
a New Post) -> New Form will have *a base form* (as you suggested). He
will *customize
it* and den Save the Form(Auto-save Draft may do this) or directly
Publishes it. *(Editor has to be designed for this ! Have a basic idea, but
Cant seem to figure out how exactly would we do this on Post.php)*

2) The '*Administrator publishes the Form'*. The Form is available to
Public to fill out.

3) A '*Foreign User fills out the Form & Submits'*. As He submits, the
submitted Data is stored in *'form_submissions' table* inside the WP
database itself(Can be queried by using the "Form_ID" field)

4) The Administrator may go to '*Settings Page'* where he would be able to
view, edit, export the "*Submitted Forms*", viewed Form_ID wise.

Now I am slightly lost on the last feature that you mentioned ! It would be
great if you could just help me on that one. !

Regards,
Deven Bansod




On Thu, Feb 20, 2014 at 5:10 AM, Ian Dunn <[hidden email]> wrote:

> On 2/13/14, 11:41 PM, Deven Bansod wrote:
>
>> 1. A *Settings Page* where you will design the Form through a user
>> friendly
>> interface like what we use while designing forms using Google Forms.
>> (*Please
>> suggest if this will be possible to make in the Required Duration* ).
>>
>
> That's the basic idea, yeah. It would actually be a custom post rather
> than a Settings page, though.
>
>
>  2. The Settings page UI, thus, will be used to make new *Forms with an
>> unique ID*.
>>
>> 3. The Plugin will have a function to generate *a short code* which will
>> have *arguments like the Form ID* etc.
>>
>> 4. The user can just go to the *'page/post'* that he wants to add the
>> survey and *use the Short Code with the right ID *as an argument and get
>> the survey running. !
>>
>
> Yeah, that's all correct. There'll also be some features specific to
> WordCamp.org, like supporting pre-defined base forms that organizers can
> customize. For instance, a "Call for Speakers" form that potential WordCamp
> speakers can fill out. It would have some standard fields like Name, E-mail
> Address, WordPress.org username, etc, but then the organizers could also
> add their custom questions to the form.
>
> Another feature we're thinking about is having the results of certain
> forms automatically populate some of our other custom post types. For
> example, when someone fills out the Call for Speakers form, it could
> automatically create a drafted Speaker post, so that the organizers don't
> have to copy/paste the data between the two.
>
>
> _______________________________________________
> wp-hackers mailing list
> [hidden email]
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>



--


*Regards,Deven G. Bansod;*
IInd Year Student
B.E.(Hons.) Computer Science + M.Sc.(Hons.)Economics(Dual Degree)
*Contact : * *Gmail* <[hidden email]>*  BITS Mail
<[hidden email]>* *Alternate Email
<[hidden email]>*

*Birla Institute of Technology & Science,* Pilani
Pilani Campus, Rajasthan 333 031, INDIA
* <[hidden email]>*
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: [GSoC - 2014] Introducing Myself

Ian Dunn
On 2/21/14, 2:57 AM, Deven Bansod wrote:
> 1) Website '*Admin*istrator' will go to '*Forms'* in the main admin
> nav menu -> Click on a '*Add New'* Form Button(Till this Its same as
> we do for a New Post) ->

Yup, exactly.

> New Form will have *a base form* (as you
> suggested).

Yeah, probably a dropdown of pre-defined forms, like "Speaker Proposal",
"Volunteer Application", etc.

> He will *customize it* and den Save the Form(Auto-save
> Draft may do this) or directly Publishes it. *(Editor has to be
> designed for this ! Have a basic idea, but Cant seem to figure out
> how exactly would we do this on Post.php)*

The Custom Post Types API takes care of most of it. You basically just
pass the paramaters that define the post type to register_post_type(),
and it creates a post type that has all the functionality of a normal
post/page out of the box.

 From there, you can add meta boxes with add_meta_box() and save data in
the postmeta table by hooking into the `save_post` action.

If you want to play around with custom post types a little bit,
http://codex.wordpress.org/register_post_type would be a good place to
start. There are also tons of tutorials online.


> 2) The '*Administrator publishes the Form'*. The Form is available
> to Public to fill out.

Right, like you mentioned earlier there'd probably be a shortcode that
you could pass an ID to, so that they could embed the form into a post
or page.


> 3) A '*Foreign User fills out the Form & Submits'*. As He submits,
> the submitted Data is stored in *'form_submissions' table* inside the
> WP database itself(Can be queried by using the "Form_ID" field)

Rather than creating a custom database table, it'd be better to create a
second post type to store submissions. It'd have a piece of metadata to
link it back to the form ID that it is associated with.

> 4) The Administrator may go to '*Settings Page'* where he would be
> able to view, edit, export the "*Submitted Forms*", viewed Form_ID
> wise.

If we create a second post type for submissions, then WP will
automatically display the submitted forms for us, and we'll just have to
add a meta box to display the custom fields.

The admins should also get an e-mail when a new submission is saved. It
should contain all the data and a link to the post in the Admin Panels.


> Now I am slightly lost on the last feature that you mentioned ! It
> would be great if you could just help me on that one. !

WordCamp.org has custom post types for Speakers, Organizers, Sponsors
and Sessions. So, when you see a Speakers page on a WordCamp site, like
http://2014.stlouis.wordcamp.org/speakers-list/, it's being build
automatically from the data stored in the Speakers posts.

Right now organizers have to manually copy and paste the data (like
their name and WordPress.org username, which is used to pull in their
Gravatar) into the Speakers post from the form that potential speakers
filled out.

That's something that can be automated, though. When the form is filled
out, we can check if it's based on one of the pre-defined forms. If it's
based on the Speaker Proposal form, then we can automatically create a
drafted Speaker post with the speaker's name, WordPress.org username, etc.

That will save organizers a lot of time and effort. They would just have
to publish the speakers they choose and leave the others as a draft,
rather than having to manually create all the posts.

You can see the source code for the Speaker/etc post types at
https://meta.trac.wordpress.org/browser/sites/trunk/wordcamp.org/public_html/wp-content/plugins/wc-post-types

_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: [GSoC - 2014] Introducing Myself

Deven Bansod
Hi Ian!

I thought I should just make my current progress on the idea clear to you
so that you can help me in a better way. So writing this mail.

As you have always been doing, please correct me where ever I am wrong or
there is a better way to do it.

I have been conceptualizing the process of how everything will work out in
the Plugin and the functions that we may require. I am also thinking about
the features that we want to add and how exactly to go about it so as to
implement them.

I have made out the basic structure of the shortcodes which will be used to
generate the forms(done for the simple forms. For Complex ones, I have to
think).
'Any suggestions over  the Improvements/Shortcomings here are most welcome'

For Example : The UI for the Form Making will generate this sort of Short
Code which will be displayed as a Proper Form in the Form Page where ever
the Form is Placed.

"
[form_start]

[element type='text' label='Name'/]
[element type='text' label='Gender' option='M,F'/]  // Will produce two
Radio Buttons with M and F as Labels and Original Label as Gender

[/form_start]

"

For the Forms and Responses from the Forms, I read about the Custom Post
Types from the links you provided and some other links too and the basic
structure of the CPTs for forms and form_feedbacks have been laid down.

For the UI to make the Forms, I have made a Custom App( using AJAX and PHP)
(Currently Independent of WP and with limited functionality but the idea is
clear) which can be used to make the custom forms(starting from the Base
Forms). I just have to figure out a way to integrate it with WP and the its
done. 'Any Help on this would be most Welcome'.

The Email to the Admin things can be done by simply plugging the Values
into a Predefined Mail Format and using wp_mail() function.

The Feature about automatically creating the Draft of the Speakers' Post
that you told in the Previous Mail is quite interesting and would automate
a lot of work and they should be and can be incorporated into the Plugin.
And I have been trying to figure out a way to do that . I was thinking on
lines of using the Function 'wp_insert_post' with the right Variable values
to do that.



Regards,
Deven
* <[hidden email]>*
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: [GSoC - 2014] Introducing Myself

Nicholas Ciske-2
I'd not advise pursuing this approach to shortcodes...

A single shortcode to output the form by id or name is the current (and best) practice.

See: every other form plugin available for WordPress.

Running dozens of short codes to output a form that's already been designed on the backend? That's going to use a lot of resources -- for what gain? Not to mention how brittle this approach is... e.g. can I intermix other shortcodes within a form? What if those also output a <form> element, breaking your form?

PS- Always prefix your shortcodes to avoid collisions with other plugins & themes.

_________________________
Nick Ciske
http://thoughtrefinery.com/
@nciske

On Feb 24, 2014, at 1:59 AM, Deven Bansod <[hidden email]> wrote:

> For Example : The UI for the Form Making will generate this sort of Short
> Code which will be displayed as a Proper Form in the Form Page where ever
> the Form is Placed.
>
> "
> [form_start]
>
> [element type='text' label='Name'/]
> [element type='text' label='Gender' option='M,F'/]  // Will produce two
> Radio Buttons with M and F as Labels and Original Label as Gender
>
> [/form_start]
>
> "

_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: [GSoC - 2014] Introducing Myself

Deven Bansod
Thanks Nick !

I had not realized that. ! Thanks for pointing it out. ! :)

I will now take it into account and start thinking of an alternative way to
do it where I just have to take in the Form ID/Name as arguments for the
short code.

I have an idea that User would make the form with the UI(opening in a new
iframe I guess from a Button in post.php?post_type=form)
and then save it. The Plugin will save the final HTML of the Form in the
"post_content" in "wp_posts" as "Draft" with CPT of "form".

User can use the Shortcode in any post/page with the Form ID if they want
or can just publish this 'form' as it is.

Will keep the mailing list posted on any new development ! Suggestions and
Advices are always welcome. !

Thanks.

Regards,
Deven


On Mon, Feb 24, 2014 at 8:57 PM, Nicholas Ciske <[hidden email]>wrote:

> I'd not advise pursuing this approach to shortcodes...
>
> A single shortcode to output the form by id or name is the current (and
> best) practice.
>
> See: every other form plugin available for WordPress.
>
> Running dozens of short codes to output a form that's already been
> designed on the backend? That's going to use a lot of resources -- for what
> gain? Not to mention how brittle this approach is... e.g. can I intermix
> other shortcodes within a form? What if those also output a <form> element,
> breaking your form?
>
> PS- Always prefix your shortcodes to avoid collisions with other plugins &
> themes.
>
> _________________________
> Nick Ciske
> http://thoughtrefinery.com/
> @nciske
>
> On Feb 24, 2014, at 1:59 AM, Deven Bansod <[hidden email]>
> wrote:
>
> > For Example : The UI for the Form Making will generate this sort of Short
> > Code which will be displayed as a Proper Form in the Form Page where ever
> > the Form is Placed.
> >
> > "
> > [form_start]
> >
> > [element type='text' label='Name'/]
> > [element type='text' label='Gender' option='M,F'/]  // Will produce two
> > Radio Buttons with M and F as Labels and Original Label as Gender
> >
> > [/form_start]
> >
> > "
>
> _______________________________________________
> wp-hackers mailing list
> [hidden email]
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>



--


*Regards,Deven G. Bansod;*
IInd Year Student
B.E.(Hons.) Computer Science + M.Sc.(Hons.)Economics(Dual Degree)
*Contact : * *Gmail* <[hidden email]>*  BITS Mail
<[hidden email]>* *Alternate Email
<[hidden email]>*

*Birla Institute of Technology & Science,* Pilani
Pilani Campus, Rajasthan 333 031, INDIA
* <[hidden email]>*
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: [GSoC - 2014] Introducing Myself

Nicholas Ciske-2
Deven,

Please download a few popular form plugins and see how they handle things -- they've already solved the problems you're facing -- the beauty of open source is that you can learn from other's code.

http://formidablepro.com
http://wordpress.org/plugins/ninja-forms/

Making a new form in an iframe popup is a interesting idea -- would be good for quick forms. However, is that the workflow users will use? Or will they author the the form and them want to insert it into (possibly multiple) posts/pages/widgets? I'm not saying either way is correct, I'm asking you to evaluate the best workflow for your users before making architectural decisions.

Saving the HTML is probably not what you want to do -- forms are dynamic things -- so the are generally best generated each time, so they can take into account the current state (required fields, errors, etc). i.e. Save the meta data about the form in custom fields on the custom post type instead, then generate the form when it's viewed.

_________________________
Nick Ciske
http://thoughtrefinery.com/
@nciske

On Feb 24, 2014, at 10:33 AM, Deven Bansod <[hidden email]> wrote:

> Thanks Nick !
>
> I had not realized that. ! Thanks for pointing it out. ! :)
>
> I will now take it into account and start thinking of an alternative way to
> do it where I just have to take in the Form ID/Name as arguments for the
> short code.
>
> I have an idea that User would make the form with the UI(opening in a new
> iframe I guess from a Button in post.php?post_type=form)
> and then save it. The Plugin will save the final HTML of the Form in the
> "post_content" in "wp_posts" as "Draft" with CPT of "form".
>
> User can use the Shortcode in any post/page with the Form ID if they want
> or can just publish this 'form' as it is.
>
> Will keep the mailing list posted on any new development ! Suggestions and
> Advices are always welcome. !
>
> Thanks.
>
> Regards,
> Deven
>
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: [GSoC - 2014] Introducing Myself

Deven Bansod
Hi!
@Teja

 : Thanks ! I will keep that in mind now on! :)

@Nick : Thanks a lot for the guidance. I will surely checkout the way in
which these plugins work. ! Will keep you posted!

Meanwhile, I had thought of an UI like this and I wanted to have
suggestions on that.

http://i.imgur.com/YrHWFC4.png?1

@Ian :
The Feature
,
that you suggested for the base forms
,
can be added as shown.

The Form Builder Meta
 

Box will help the user to build the Forms. As soon as the User Clicks the
'Add New Element' button, the 'New Element' Box Pops up. User Fills out all
the Properties related to this Element which will include all the
conditions, custom error msgs, parent field  and all
 and clicks 'Add'
.
 The New element gets added to the Form(not shown here) and the New
Element Popup goes away.
(Not many
element
properties have been shown here,
They
will be added later)

Thus,
 
the User does this for all the Elements and then clicks 'Save the Form'.
Now all the Meta Data is stored and the Form can be published.

 The area besides the New Element Box will continuously show the Live Form
fields and their order which can be changed by simple drag and drop.

Once the Form is saved, The Plugin will automatically generate a
*
Form
_
ID
*
that will be passed onto post-content to show up when the form is loaded.
The Plugin will generate the JS required for simple fields validation
automatically from the Properties that user enters for the Element while he
was adding it.

The Plugin may also provide an option to add a few lines before the actual
form starts. For example, the lines written in the text
 
box shown in the right!

Once the Structure for the forms and UI for the form making has been
finalized, I will start
 
thinking
 
on how the submitted forms will be handled and presented to the admin. !

Please provide your feedback on this and correct me if I am wrong
anywhere. ! :)

Thanks.

Regards,
Deven


P.S. : Congrats to all GSoC 2014 Aspirants ! WordPress Selected as a
Mentoring Organization !
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: [GSoC - 2014] Introducing Myself

Eric Hendrix
Ajax? I'm interested in your solution. —
Eric A. Hendrix
[hidden email]
910-644-8940

On Tue, Feb 25, 2014 at 6:19 AM, Deven Bansod <[hidden email]>
wrote:

> Hi!
> @Teja
>  : Thanks ! I will keep that in mind now on! :)
> @Nick : Thanks a lot for the guidance. I will surely checkout the way in
> which these plugins work. ! Will keep you posted!
> Meanwhile, I had thought of an UI like this and I wanted to have
> suggestions on that.
> http://i.imgur.com/YrHWFC4.png?1
> @Ian :
> The Feature
> ,
> that you suggested for the base forms
> ,
> can be added as shown.
> The Form Builder Meta
>  
> Box will help the user to build the Forms. As soon as the User Clicks the
> 'Add New Element' button, the 'New Element' Box Pops up. User Fills out all
> the Properties related to this Element which will include all the
> conditions, custom error msgs, parent field  and all
>  and clicks 'Add'
> .
>  The New element gets added to the Form(not shown here) and the New
> Element Popup goes away.
> (Not many
> element
> properties have been shown here,
> They
> will be added later)
> Thus,
>  
> the User does this for all the Elements and then clicks 'Save the Form'.
> Now all the Meta Data is stored and the Form can be published.
>  The area besides the New Element Box will continuously show the Live Form
> fields and their order which can be changed by simple drag and drop.
> Once the Form is saved, The Plugin will automatically generate a
> *
> Form
> _
> ID
> *
> that will be passed onto post-content to show up when the form is loaded.
> The Plugin will generate the JS required for simple fields validation
> automatically from the Properties that user enters for the Element while he
> was adding it.
> The Plugin may also provide an option to add a few lines before the actual
> form starts. For example, the lines written in the text
>  
> box shown in the right!
> Once the Structure for the forms and UI for the form making has been
> finalized, I will start
>  
> thinking
>  
> on how the submitted forms will be handled and presented to the admin. !
> Please provide your feedback on this and correct me if I am wrong
> anywhere. ! :)
> Thanks.
> Regards,
> Deven
> P.S. : Congrats to all GSoC 2014 Aspirants ! WordPress Selected as a
> Mentoring Organization !
> _______________________________________________
> wp-hackers mailing list
> [hidden email]
> http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: [GSoC - 2014] Introducing Myself

Deven Bansod
Hi Eric!

Ya. I have just conceptualized the Workflow till now!
I hope most of the things I am Planning for, will be done by JS and AJAX
with a little PHP in the backend.

I am attaching two empty divs for Element Properties(Shown) and One for
Live Form Fields(Not shown) in the Meta Box itself.

Once an User clicks the Add Element button JS comes into Pic and it creates
a small form for taking in the Properties. Then as the user clicks 'Add'
button, AJAX enters. It sends it to a Handler PHP in the background which
in turn stores the current situation of the form in wp_postmeta.

This continues till all the elements are done.!

Then as the User clicks Save the Form. The Handler.php(in the Plugin
Folder) finalizes everything and passes the Form_ID into post_content which
plugin will use to display the Form when a Responder sees it.

Finally enter all the other fields on the post.php and click on 'Publish'
(Here 'Update'). And You are done !

Please correct me if I am wrong anywhere. Also advice if something may not
be possible to do or if there is a better way to do it.

Regards,
Deven
* <[hidden email]>*
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: [GSoC - 2014] Introducing Myself

Teja Amilineni
In reply to this post by Deven Bansod
@Deven - This is interesting. Meanwhile, I have been thinking if post meta
is a good way to implement the forms? Each form would a number of
sub-elements and attributes. Can this be handled? Would it be better off
having a new data type. Most of the forms plugins seem to do it this way...


On Tue, Feb 25, 2014 at 4:49 PM, Deven Bansod <[hidden email]>wrote:

> Hi!
> @Teja
>
>  : Thanks ! I will keep that in mind now on! :)
>
> @Nick : Thanks a lot for the guidance. I will surely checkout the way in
> which these plugins work. ! Will keep you posted!
>
> Meanwhile, I had thought of an UI like this and I wanted to have
> suggestions on that.
>
> http://i.imgur.com/YrHWFC4.png?1
>
> @Ian :
> The Feature
> ,
> that you suggested for the base forms
> ,
> can be added as shown.
>
> The Form Builder Meta
>
>
> Box will help the user to build the Forms. As soon as the User Clicks the
> 'Add New Element' button, the 'New Element' Box Pops up. User Fills out all
> the Properties related to this Element which will include all the
> conditions, custom error msgs, parent field  and all
>  and clicks 'Add'
> .
>  The New element gets added to the Form(not shown here) and the New
> Element Popup goes away.
> (Not many
> element
> properties have been shown here,
> They
> will be added later)
>
> Thus,
>
> the User does this for all the Elements and then clicks 'Save the Form'.
> Now all the Meta Data is stored and the Form can be published.
>
>  The area besides the New Element Box will continuously show the Live Form
> fields and their order which can be changed by simple drag and drop.
>
> Once the Form is saved, The Plugin will automatically generate a
> *
> Form
> _
> ID
> *
> that will be passed onto post-content to show up when the form is loaded.
> The Plugin will generate the JS required for simple fields validation
> automatically from the Properties that user enters for the Element while he
> was adding it.
>
> The Plugin may also provide an option to add a few lines before the actual
> form starts. For example, the lines written in the text
>
> box shown in the right!
>
> Once the Structure for the forms and UI for the form making has been
> finalized, I will start
>
> thinking
>
> on how the submitted forms will be handled and presented to the admin. !
>
> Please provide your feedback on this and correct me if I am wrong
> anywhere. ! :)
>
> Thanks.
>
> Regards,
> Deven
>
>
> P.S. : Congrats to all GSoC 2014 Aspirants ! WordPress Selected as a
> Mentoring Organization !
> _______________________________________________
> wp-hackers mailing list
> [hidden email]
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: [GSoC - 2014] Introducing Myself

Deven Bansod
Ya, I understand that it would require a lot of rows. Will think about it
and tell .

But Sorry could not understand you on 'new data type'. Are you suggesting
to make a Separate table in the DB for storing all the things related to a
form ?
* <[hidden email]>*
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: [GSoC - 2014] Introducing Myself

Ian Dunn
In reply to this post by Deven Bansod
Hi Deven, sorry for the delayed response, but it sounds like you're
heading in the right direction :)


 > The Form Builder Meta
 > Box will help the user to build the Forms. As soon as the User Clicks the
 > 'Add New Element' button, the 'New Element' Box Pops up. User Fills
out all
 > the Properties related to this Element which will include all the
 > conditions, custom error msgs, parent field  and all
 >   and clicks 'Add'

Popups are almost always a bad idea because users hate them and most
browsers block them, so instead you'd want to use a modal box. The Core
API provides one that can be used by plugins.

It's also worth considering if it'd be better to just do everything
inline, but a modal may be a better approach depending on how much data
will need to be collected about each element, etc.


 > The Plugin may also provide an option to add a few lines before the
actual
 > form starts. For example, the lines written in the text
 > box shown in the right!

That's probably unnecessary, since the user can just add that to the
page itself before they add the shortcode that renders the form.



> Then as the User clicks Save the Form. The Handler.php(in the Plugin
> Folder) finalizes everything and passes the Form_ID into post_content which
> plugin will use to display the Form when a Responder sees it.

WP already provides a standard AJAX handler (/wp-admin/admin-ajax.php),
so it's best to use that instead of a custom one.



It's great to see that you're very enthusiastic about the project, but
I'd caution against getting too deep into it at this stage. Once we
accept an application, we'll get into more detail about the project
specs and work through some things that still need to be decided, so any
code you write today may not be applicable tomorrow.

I think that, right now, any potential applicant would be better served
by spending their time learning to implement the fundamental features
that are common in plugins, and also brushing up on best practices for
WordPress development.

* actions and filters
* input validation / output sanitization, nonces, current_user_can()
* custom post types and custom taxonomies
* the settings api
* shortcodes
* how WP handles AJAX
* wp_cron
* multisite
* unit testing (phpunit and qunit)
* etc
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: [GSoC - 2014] Introducing Myself

Deven Bansod
Hi Ian!
Thanks a lot for that Guidance! I needed just that.!

I was thinking about the Modal Thing only
,
but
I got the nomenclature wrong. I had seen the
*ThickBox Library* for WordPress for that. Can this be used for the
Modals?

Anyways, I had been thinking too much about the Plugin itself and not the
overall WP coding standards and all the other things you have mentioned. I
will definitely go over through all this to get a much better idea how all
the things and features, that we have discussed, would be implemented in WP
and also refreshing the best practices and fundamental features in Plugin
Development.

Also, I will start working on the Application soon and will post the Link
here, once I am done. It would be great if you could suggest any
improvements/shortcomings in that.



Thanks again! :)
Will keep you posted on the Thread.

Regards,
Deven
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: [GSoC - 2014] Introducing Myself

Ian Dunn
On 3/1/14, 9:57 PM, Deven Bansod wrote:
> I had seen the
> *ThickBox Library* for WordPress for that. Can this be used for the
> Modals?

Thickbox is still available, but it's no longer maintained upstream, so
it's better to try and reuse the 3.5 Media modal if possible. See #10955.

_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: [GSoC - 2014] Introducing Myself

Deven Bansod
Hi Ian!
I will look into the Media Modal thing but I think it may not even be
required. But at first, as you had rightly suggested, I am now
concentrating more on reading more and more about the general WP
development techniques, pre-reqs and getting the basics clear.!

Thanks.

Regards,
Deven
* <[hidden email]>*
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: [GSoC - 2014] Introducing Myself

Deven Bansod
Hi Ian!
I have been reading more about the general WP Development recently. I must
say, it is helping me a lot. I am realizing the things that I mostly would
forget or take for granted without knowing why am I doing it. I think my
coding style would see a nice shift from what I had coded in the Simple
Plugins that I wrote to what I would develop after reading this.

Also, I have trying to think more about the Problems that may arise in
implementing the Plugin. The most prominent one that I could think of was
of Preventing the Spam (I guess, always a major problem in Forms). The
Sanitizing Functions like esc_ functions,data validation functions,
sanitize functions etc that I read about will be useful here. Any more
Ideas/suggestions would be more than welcome here.

I am working on my project application now.
Will keep you informed. :)

Regards,
Deven
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
12