CodeIgniter Forums
Form Generation Library - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: Form Generation Library (/showthread.php?tid=16439)



Form Generation Library - El Forum - 06-26-2009

[eluser]quasiperfect[/eluser]
really nice lib.
if production ready (after running the example on svn ci in the logs i see a lot of undefined indexes,notices,propertys) ?


Form Generation Library - El Forum - 06-27-2009

[eluser]macigniter[/eluser]
[quote author="Cyclops" date="1245324248"]Hey, Mr FormGenLib,

Great work! A framework should not be without a library like this.

One quick question:
Is there a way to define validation rules in a file, or in an array somewhere, and then have the $form object load the specified rules up for each specific form? This would be very nice if similar forms will be used in more than one place (like as in create / edit / ajaxEdit, etc).

Any help would be great Smile[/quote]

Hi there, you can define default validation rules in the config file for certain form elements. Please check out this document in the user guide.


Form Generation Library - El Forum - 06-27-2009

[eluser]macigniter[/eluser]
[quote author="quasiperfect" date="1246036537"]really nice lib.
if production ready (after running the example on svn ci in the logs i see a lot of undefined indexes,notices,propertys) ?[/quote]

Please send them to me!! I need your feedback to improve this library. Can you please send the logs to info at frankmichel dot com? Thanks!


Form Generation Library - El Forum - 06-27-2009

[eluser]quasiperfect[/eluser]
mail sent Smile


Form Generation Library - El Forum - 06-30-2009

[eluser]IamPrototype[/eluser]
Where can I find the latest release, and are you still working on it?


Form Generation Library - El Forum - 06-30-2009

[eluser]got 2 doodle[/eluser]
I used this library on a site recently. Awesome library!

One problem that caught me by surprise was the form rendering in IE8, because we all know how clever the coders are at MS and their browsers have historically been very compatible!

Anyway this renders great in all browsers except IE8, I had to install IE8 and wipe out my treasured install of IE6 (my acid test).

So I guess IE8 is the new IE6! Please see attached screen shots. The CSS is virtually untouched from the CSS supplied with the lib example.

Attached images are from firefox3 ie8 and safari(recent anyway).

doodle


Form Generation Library - El Forum - 06-30-2009

[eluser]got 2 doodle[/eluser]
Forgot to mention that everything rendered fine in ie6 and ie7.

doodle


Form Generation Library - El Forum - 07-05-2009

[eluser]macigniter[/eluser]
can you supply the generated source code of the radio button part (or the checkboxes)?


Form Generation Library - El Forum - 07-05-2009

[eluser]quasiperfect[/eluser]
@macigniter take a look at http://sprawsm.com/uni-form/ for the css part


Form Generation Library - El Forum - 07-06-2009

[eluser]got 2 doodle[/eluser]
here is the generated source code for the check buttons.
There is some jquery stuff in there too.

Code:
<legend>Availability</legend>
&lt;input type="radio" name="availability[]" value="0" class="check"&gt;&lt;label for="msg1" class="left check">I am available to volunteer for just the festival weekend only.</label><br />&lt;input type="radio" name="availability[]" value="1" class="check"&gt;&lt;label for="msg2" class="left check">I am available to volunteer the week leading up to and/or the week after the festival</label><br />&lt;input type="radio" name="availability[]" value="2" class="check"&gt;&lt;label for="msg3" class="left check">I am available to volunteer the week leading up to and/or the week after the festival <br /><strong>AND</strong> the festival weekend</label><br /><br /><div class="info" id="avail_message0" style="display:none"><p>This might be a good time to point out.</p>
        <ul>
        <li>you can get a daypass for only 6 volunteer hours</li>
        <li>you can get a weekend pass for 12 volunteer hours</li>

        </ul>
        <p>If you can you might want to choose one of the other options so that you can volunteer your time before or after the event and you get to enjoy the festival during the weekend of the event.</div><div class="info" id="avail_message1" style="display:none"><p>Thanks, we really need volunteers like you to help us make this a great event. These are the tasks that we need people for before and after the event.</p>&lt;input type="checkbox" name="prepost_a[]" value="1" class="check" id="fe439"  /&gt;&lt;label for="fe439" class="left check">Infrastructure - grounds clean up</label><br />&lt;input type="checkbox" name="prepost_a[]" value="2" class="check" id="de5ae"  /&gt;&lt;label for="de5ae" class="left check">Campground</label><br />&lt;input type="checkbox" name="prepost_a[]" value="4" class="check" id="bcc57"  /&gt;&lt;label for="bcc57" class="left check">Tickets / Box Office</label><br />&lt;input type="checkbox" name="prepost_a[]" value="8" class="check" id="c7ccd"  /&gt;&lt;label for="c7ccd" class="left check">Media / Promotions</label><br />&lt;input type="checkbox" name="prepost_a[]" value="16" class="check" id="aaabe"  /&gt;&lt;label for="aaabe" class="left check">Loader / Stage Crew</label><br /><p>A volunteer manager will be contacting you for your time before and after the event.</p>&lt;input type="submit" name="pre_submit" value="Submit" class="button" id="pre_submit"  /&gt;&lt;/div><div class="info" id="avail_message2" style="display:none"><p>Fantastic! we really need volunteers like you to help us make this a great event.  In addition to the following tasks that we require before and after the event, all tasks that you qualify for will be shown to you on the next page.</p>&lt;input type="checkbox" name="prepost_b[]" value="1" class="check" id="f5a8f"  /&gt;&lt;label for="f5a8f" class="left check">Infrastructure - grounds clean up</label><br />&lt;input type="checkbox" name="prepost_b[]" value="2" class="check" id="c4abe"  /&gt;&lt;label for="c4abe" class="left check">Campground</label><br />&lt;input type="checkbox" name="prepost_b[]" value="4" class="check" id="c411b"  /&gt;&lt;label for="c411b" class="left check">Tickets / Box Office</label><br />&lt;input type="checkbox" name="prepost_b[]" value="8" class="check" id="e89f6"  /&gt;&lt;label for="e89f6" class="left check">Media / Promotions</label><br />&lt;input type="checkbox" name="prepost_b[]" value="16" class="check" id="b594d"  /&gt;&lt;label for="b594d" class="left check">Loader / Stage Crew</label><br /><p>A volunteer manager will be contacting you for your time before and after the event.</p></div></fieldset>

continued next post