FORUMS CLOSED DUE TO SPAM. YOU STILL CAN ADD POST!

Form plugin

Feed 30 posts, 11 voices

Avatar
27 posts

I’m developing yet another plugin to manage contact forms, i try and play with every plugin i found, but no one “work”/fit my need/desire, so i try to explain my idea to know your opinion.

Al form solutions that i try doesn’t do any kind of error checking, some plugin even if fields are empty or logically incorrect (ex: numer on email field) accept input data and send me to another page, i think it’s not acceptable.

My idea is a “Form” controller that help to build forms definition, for example
field_type (number, email, etc..) and file_name…
After created a form from a page a people can call a function “render(form_name)” that create html code, and if submited show errors etc… or i can create a from by hand and call specific function to check or print errors.

The auto generated html code could be always personalized via css and probaly cover 99% of needs.

Yes, i know that i can write php code on the page, but on every site it’s always the same thing.. and i’m lazy and tired :P … also in this way event non coders (something like an editor ) could add form field or a new form.

What do you think about this approach?

Actually the plugin is already done, except for the Controller add/edit part that show a simple textarea where it’s possible to define the form in a sort of texttile way… my desire is to write a sort of form builder with a js interface, but don’t know prototype (i prefare jquery, sorry), so for my needs it is enough for now.

 
Avatar
8 posts

Great idea! Are you also planning on pointing out landingpages (when a form is submitted you can choose where user is being redirect to)?
Is form validation done serverside? Or JS? Of maybe AJAX, serverside validation without pagerefresh?

A formbuilder interface would be great! It would be nice if you could drag you items onto the form…

Is there also room for an inserting different action? for example: mailing or saving in the database?

 
Avatar
1493 posts

@beres – sounds like a plan to me! I assume you know about tuupola’s jQuery plugins (both of them), as well as his Emailer? I guess from what you say above that you have played with it already.

 
Avatar
27 posts

The validation is server side, and actually there’s ajax support, but could be easy to add. The plugin sends email sends email only.

The form builder at this time it’s only an idea because my desire to learn/play with prototype…

 
Avatar
27 posts

@David

I’ve tried “BDContact”, “Email template” and “Contact form”. Please let me know if other exists.

 
Avatar
1493 posts

@beres – I think that’s all there are at the moment. I was thinking you were going to put this in jQuery (and so tuupola’s jQuerey and jQuery_UI would be helpful).

Do you have a copy of BD Contact, then? If so, could you send it to madebyfrog \at/ gmail /dot\ com? Thanks! (We’re trying to collect all the BD plugins while he gets his own site sorted out!)

 
Avatar
27 posts

@david

sorry i read your previous message too fast :P
I tired tuupla’s jQuery plugin but i’had some problem with it (jQuery non UI) working with more files… i’m still playing with it btw.

I searched the plugin on my hd but i suppose to have trash it, sorry.

 
Avatar
291 posts

I tired tuupla’s jQuery plugin but i’had some problem with it

What was the problem?

 
Avatar
27 posts

@tuupola

I had some problem using your jQuery wrapper, i don’t believe it depend of your mistake… but i’ve not investigated yet.

It seems that after loading some script, from a “page” i can’t call jquery function, for example.

I enclose the content of the script between:

file: foo.js
jQuery(function($) {
  functoin foo() {}
});

and when for another file or a “page” i try to call the function, it seems to have different scope.

<script src="foo.js" ...
jQuery(function($) {
  console.log(foo());
});

In my script i generate html code from js an bind some function on varius events etc… but for some reason that functions can’t found.

Why do not port Frog to jQuery instead of create wrapper, if many peoples seems to prefer them? :P
I’m joking, even if time ago i made this indecent propose to phillipe, i could have also a 80% ported tarball somewhere…

 
Avatar
24 posts

@beres or @tuupola if you see this come on IRC, I have almost a working version but I need help from some experienced plugin devs to finish it.

 
Avatar
291 posts

@beres: So actually it is scope issue with your code, not issue with jQuery plugin :)

 
Avatar
25 posts

I could really use this plugin if a version is available. I am finishing a project right now. I was going to use tuupola’s email_template which is working fine, but I don’t believe there is any form of validation on tuupola’s plugin. Correct me if I am wrong.

Thanks to everyone who works on all these plugins it is more that I can offer at this point so I am grateful.

 
Avatar
24 posts

Do you need it multilingual? That part isn’t really done yet…

 
Avatar
25 posts

Nope just plain old english.

 
Avatar
1493 posts

At the rate you guys are posting, you could be in IRC #frogcms. :P

 
Avatar
24 posts

I am on IRC…cu3edweb could come too

 
Avatar
25 posts

I am at work right now. No access to irc unless I use a browser based one which the company I work for might have blocked. :)

 
Avatar
24 posts

Let me see if I can get something together.

 
Avatar
24 posts

yeah this thing is still a ways away from a release cu3edweb. Might have to hang in there a bit.

 
Avatar
25 posts

alright :( let me know if I can get my hands on that. Thanks for everything.

 
Avatar
27 posts

People that desire to try/test/help the plugin can be downloaded here

Anyway:

  • it’s incomplete, working, but incomplete
  • at this time the admin interface is manual, not js yet
  • the help written in the sidebar, is fake, don’t trust it… i’m only plaing with frog’s api

The reply message and email template is inspired by tuupola’s plugin…in the next few days i hope to have time to finish it.

 
Avatar
8 posts

I just tried it and i can’t save forms…it just hopps to another tab and it doen’st save it.

 
Avatar
27 posts

@Luuk

There was a problem on a table name, and a redirect link, i’ve uploaded a new version

Form example:

name|true|string|Name
email|true|email|Email
phone|false|phone|Phone
subject|false|choices|Subject|Foo,Bar
text|true|text|Message

In page editing, type Form

<?= $this->form->form('_name_of_your_form', '_name_tab_with_template', 'name_tab_with_success_message'); ?>

Email template

To: foo@example.com
Subject: [example.com] contact form
From: noreplay@example.net

Form data:

%form%
 
Avatar
108 posts

It keeps coming back saying Name must be unique, stopping me adding forms. Any idea?

 
Avatar
1 posts

I got the same problem with this plugin.

Anyone knows a working contact form plugin for FrogCMS?