maned / goblin

A Content Management System Built in Pure Javascript
http://goblin.jit.su/
19 stars 13 forks source link

Form Generation #59

Open PunkChameleon opened 10 years ago

PunkChameleon commented 10 years ago

There's been some demand for a form generation page -- think contact page.

Here's my brief thoughts on how to execute:

Add another gob file for form.gob, that has some scripting that makes a post call.

Add a default option to 'Pages' in the admin that paints an admin area that allows us to add form fields

Every addition would ask for label, id

At bottom you would enter post URL which would be templated into the AJAX calls

Any thoughts? If this were built into goblin I think it'd make it much easier to build all components of the site pretty quickly and help raise adoption!

SotiriosVrachas commented 10 years ago

I was thinking that our target group use CRM software to generate forms and includes the html in their pages. That way their data goes directly to their "leads" tab.

Right Now

Or if you created a contact template

The question is ware the data will go if we create a form generator? I don't think that storing them next to navigation data is wise. Who would log in to every goblin site they have just to view if they have something? We could foreword them to email but every environment is different, and email is famously broken without a white-listed SMTP. The functionality would be a bad addition to the API, just impractical to have something like this in core. There are free services that do that.

But for the case of "all in house" we could put together a standalone plugin, with smtp settings that would serve an express post address. The simplification of the creation of the html part is a job of the WYSIWYG editor, i don't remember if ours dose that but (CKEditor form plug in)[http://ckeditor.com/addon/forms] dose and many more. The mail api would be catch all and for anti spam (captcha)[https://nodejsmodules.org/tags/captcha].

Obviously the plugin form plugin will require some modification but thanks to FOSS that wont be a problem

jnoonan commented 10 years ago

+1

PunkChameleon commented 10 years ago

I think the idea of changing up our wysiwig to have one that supports both wysiwig and html input is a good idea. Right now we're using the HTML5 bootstrrap wysiwig editor, which I'm not sure has HTML input capabilties by default. This may be an option though -- I'll check in on this.

I agree that we shouldn't get into the SMTP game. Originally I was thinking we could just have a field in the form creation page that would be the URL the form would POST to -- whether it be on the server goblin is hosted on or another would be up to the user.

A optional plugin could also be a good solution as well though -- anything that makes it easier for user to set things up would be great, and I'd like to move to an infrastructure that would allow modular plugins like this to easily exist

SotiriosVrachas commented 10 years ago

form gen plugins usually have action setting