Announcing CGBetterForms v0.7 - A new form building module

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Announcing CGBetterForms v0.7 - A new form building module

Post by calguy1000 »

FOR TESTING!

What is this
This is a new generation of form handling module that provides the ability for web professionals to build forms the way they know how, using HTML, CSS and javascript.. and then easily define what should happen with the data users submitted.
This module can allow you to create well styled, dynamic forms, using whatever toolkit you like (Bootstrap, Foundation, etc). and integrate javascript. Then quickly define how the form data should be processed.

Features
* You create the form. and can get it looking the way you want.
* Allows for javascript validation, and HTML5 field types.
* Can verify data from HTML5 attributes on the server side, even if the browser does not support them natively.
* Provides data attributes to assist in rendering and handling the form.
Integrates with smarty
* Takes advantage of CMSMS 2.2 features like template types and hooks
* Tests your code to tell you about parsing errors and potential rendering, or submission problems.
* Supports file uploads
* Addresses security issues:
- Supports captcha
- Has built in honeypot captcha support
- Each request is assigned a unique GUID, which is validated on submission.
- Automatically disallows HTML tags in submitted responses.
- Form attributes are parsed and stored in the database, and validated on the server to mitigate Man-in-the-Middle attacks.
* Has multiple server-side data validation routines
* Create validations by automatically parsing your HTML and template.
* Multiple built-in handlers/dispositions.
* Easily add handlers and dispositions via the API.
* Supports hooks for validation and disposition/handling.
* Much More

This is a new module that requires a minimum of CMSMS 2.2 beta3. And I am looking for testers. I think once you kick the tires a bit, and look at some of the sample forms you will be quite impressed with what can be done with this new module.

This is a whole new concept in building forms, it assumes you know how to build your form and get it to look and behave the way you want, and that you primarily need assistance in the data management aspects of form handling... and in security. So that's what CGBetterForms does.

You build the form HTML, CSS, javascript, and can use smarty to assist in rendering, and providing input fields. CGBetterForms will scan your HTML and detect the fields, provide some useful information about your form (if there are things of concern, and allow you to determine how to validate the data, and what to do with the validated data.

Have fun, and kick it around. Don't be afraid to ask questions.

http://dev.cmsmadesimple.org/projects/cgbetterforms
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
kpurcell
New Member
New Member
Posts: 5
Joined: Thu May 12, 2011 5:31 pm

Re: Announcing CGBetterForms v0.7 - A new form building modu

Post by kpurcell »

I'll setup a test install and check it out. I have used FormBuilder for a long time but was looking for a replacement.

thanks
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Announcing CGBetterForms v0.7 - A new form building modu

Post by calguy1000 »

I released CGBetterForms 0.9 last week.

The improvements are relatively minor... mostly just fixing typos in the standard templates, and a minor improvement to the template parsing.

CGBetterForms is a great tool to use if you want a simple form, styled the way you want it, with simple handling. (Email, CSV, Post to a web hook, etc).

Be sure to let me know how it works for you.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
webguru
Forum Members
Forum Members
Posts: 97
Joined: Thu May 08, 2014 6:18 pm

Re: Announcing CGBetterForms v0.7 - A new form building modu

Post by webguru »

This works very nicely. Love that I can use my html forms...seems a natural progression when I'm using my custom template designs.

When I scan the forms, I get these errors:
Could not find a label for field "full_name" at about line 6.
Could not find a label for field "email" at about line 10.
Could not find a label for field "phone" at about line 14.
Could not find a label for field "event" at about line 18.

Unless I'm missing something, I do have the fields labelled.

Also, when I do get the email, all I get is the email address. Not the rest of the input data.

<form class="form-container">
<table>
<tr>
<td><label for="full_name">Name*</label><br>
<input type="text" name="full_name"></td>
</tr>
<tr>
<td><label for="email">Email*</label> <br>
<input type="text" name="email"></td>
</tr>
<tr>
<td><label for="phone">Phone* </label><br>
<input type="text" name="telephone"></td>
</tr>
<tr>
<td><label for="event">Event Description*</label> <br>
<input name="event" type="textarea" maxlength="100"></td>
</tr>
<tr>
<td colspan="2"><input type="submit" name="btn" class="button" value="Submit"></td>
</tr>
</table>
</form>
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Announcing CGBetterForms v0.7 - A new form building modu

Post by calguy1000 »

https://www.w3schools.com/tags/tag_label.asp

And tables are for displaying columnar data. Not for forms
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
webguru
Forum Members
Forum Members
Posts: 97
Joined: Thu May 08, 2014 6:18 pm

Re: Announcing CGBetterForms v0.7 - A new form building modu

Post by webguru »

I fixed the forms and got a clean bill of health.

I tested the form and all I'm still receiving is the email address.

Here are my validations:

Validation
Detect HTML tags in form input
Ensure that values for field email are valid email addresses
Validate that all required fields are present
Validate the value of select fields

Only have 1 handler:
Email results to paul@emailaddress.com

Appreciate your help.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Announcing CGBetterForms v0.7 - A new form building modu

Post by calguy1000 »

And what handler?
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
webguru
Forum Members
Forum Members
Posts: 97
Joined: Thu May 08, 2014 6:18 pm

Re: Announcing CGBetterForms v0.7 - A new form building modu

Post by webguru »

Handler: Email results to specified addresses

Here is the form again:

{cgbf_form_errors}
<form class="form-container">
<label for="full_name">Name*</label>
<input type="text" name="full_name" id="full_name"><br>
<label for="email">Email*</label>
<input type="text" name="email" id="email"><br>
<label for="phone">Phone* </label>
<input type="text" name="phone" id="phone"><br>
<label for="event">Event Description*</label>
<input name="event" type="textarea" id="event" maxlength="100"><br>
<input type="submit" name="btn" class="button" value="Submit">
</form>

Am I missing anything?
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Announcing CGBetterForms v0.7 - A new form building modu

Post by calguy1000 »

Okay, I tested with exactly this template, in a brand new form. The email worked as expected.

The handler template will not automatically update when you throw in new fields. So perhaps you created the handler template with only one field, then later added fields?

If so, then just click on the 'reset template' button on the hander. Or destroy and re-create the handler.

I will release a new version soon with some very minor changes.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
webguru
Forum Members
Forum Members
Posts: 97
Joined: Thu May 08, 2014 6:18 pm

Re: Announcing CGBetterForms v0.7 - A new form building modu

Post by webguru »

That did the trick...the validation had the original on it and needed to be updated.

The form is working, but on the page above the form itself, I'm getting the word "Array" showing on the live page. It is not in my template or on the form.

Any idea why the page is throwing that onto the page?

Thanks!
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Announcing CGBetterForms v0.7 - A new form building modu

Post by calguy1000 »

That's fixed in the next version.

You need to assign the output to a smarty variable.

so {cgbf_form_errors assign=errors}
{if !empty($errors)}
<ul>
{foreach $errors as $error}
<li>{$error}</li>
{/foreach}
</ul>
{/if}
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
webguru
Forum Members
Forum Members
Posts: 97
Joined: Thu May 08, 2014 6:18 pm

Re: Announcing CGBetterForms v0.7 - A new form building modu

Post by webguru »

Thanks, CalGuy...that worked!
tamsrud
Forum Members
Forum Members
Posts: 37
Joined: Mon Jun 06, 2011 6:25 am

Re: Announcing CGBetterForms v0.7 - A new form building modu

Post by tamsrud »

I have tested this module on a couple of sites now, and I find it very flexible and modern in all ways.

Keep up the good work!
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Announcing CGBetterForms v0.7 - A new form building modu

Post by calguy1000 »

Code: Select all

I have tested this module on a couple of sites now, and I find it very flexible and modern in all ways.

Keep up the good work!
Excellent, thank you!
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Post Reply

Return to “Modules/Add-Ons”