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 - 08-05-2009

[eluser]pysco68[/eluser]
Well cool, thanx!

You know what you've got to add to your doc Wink and concerning your user guide, would be rather cool to land on a page "Not done yet" rather than getting a 404...

If you plan to make your lib multilang, drop me a PM for French and German - if desired Wink
Would love to contribute some lines to your nice tool.

Greetz from France


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

[eluser]macigniter[/eluser]
I have updated the user guide so it doesn't show 404's anymore. Thanks for pushing me on this. I wanted to this anyway, but now that you mentioned it again :-)

Update: I have also faded out all navigation items that are not yet available

Thanks for offering translation! Although the library doesn't really need any language file since validation is handled via CI (I will get to this in the user guide as soon as it's done). I don't think it's necessary to translate the internal error messages since they should be eliminated before the form goes live.


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

[eluser]pysco68[/eluser]
Much nicer now Wink

Now I'm going to put it all together (my Work-in-progress-Auth-system and your great piece of software Wink ) i'll drop you a line if it should be published! (hope you're ok with that, even if you mentioned the MIT-Licence in your files... I still prefer to ask)

I plan to make a fully configurable auth-system, so the Form Generation is just perfect!!

Have a nice day Wink


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

[eluser]macigniter[/eluser]
[quote author="pysco68" date="1249500766"]Much nicer now Wink
hope you're ok with that, even if you mentioned the MIT-Licence in your files... I still prefer to ask[/quote]

sure. just let me know if you find any bugs or improvements, so everybody else can benefit from it...


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

[eluser]got 2 doodle[/eluser]
@psyco68 keep us posted on your auth library!

maybe you can post a link in this thread for those who are subscribed.

@macigniter thanks again for all your hard work!

doodle


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

[eluser]pysco68[/eluser]
could be done Wink

I think that I will release the lib (a very beta to begin ^^) the next 14 days... and as Macigniter said on the very begin of this thread, when there's a little bit of doc (hummmm...)
Gobaly it's rather a lightweight solution... I had some bad experience with Freakauth and dxAuth some times ago... I'll post the link as soon as possible Wink

Ciao!


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

[eluser]jfox[/eluser]
[quote author="macigniter" date="1249501267"]
sure. just let me know if you find any bugs or improvements, so everybody else can benefit from it...[/quote]

@macigniter- Used this on a recent CI dev project and I really like it. Pretty intuitive way to construct a form. Will give feedback on any issues that arise.


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

[eluser]pysco68[/eluser]
Hi, I'm back again Wink

This time with a little "bug", or an ugly solution to a problem...
I'm making the reCAPTCHA integration into your library... It works so far, I'm just gettin' stuck over this little piece of code:

Code:
// set config vars
foreach ($config as $key=>$value)
{
    if ($value) $this->{$key} = $value;
}
(file: Form.php ~~ line: 70 ~~ initialisation of the Class El)

'cause I'm trying to pass a BOOLEAN "false", and of course the condition is not fullfilled -_-"

I only go more or less ugly solutions to this (not passing a BOOL for example...) have you any other/better idea?

Greetz

(I'll post / send the Patched / extended version as it's finished Wink )

Good night!


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

[eluser]pysco68[/eluser]
Me again ^^

the reCaptcha integration is nearly ok... I just got ONE big problem... for the validation of the reCAPTCHA field I need to use a callback function, ok so far...

The problem is that the callback is not launched... I mean, i've put debug messages on every end of your file, and the point is that every validation rule I may define for the field is executed, as long as it's a Native CI rule...

Here's the pieces of code:

Code:
function recaptcha($label='')
{
                $info = array();
                $info['for'] = 'recaptcha_response_field';
                $info['name'] = 'recaptcha_response_field';
                $info['type'] = 'recaptcha';
        $info['label'] = $label;
        $info['rules'] = 'required|callback__recaptcha_check|max_length[128]|xss_clean';
                $this->add($info);
         return $this;
}
(class: Form)

it's just the piece of code that adds the reCAPTCHA field (that's still working), the error messages ("Field is required"...) are working, now there's just that freakin' callback... 'hope there's just a mistake on my side...

Greetings Wink


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

[eluser]macigniter[/eluser]
[quote author="pysco68" date="1249566454"]
$info['rules'] = 'required|callback__recaptcha_check|max_length[128]|xss_clean';
[/quote]

you have two underscores in callback__recaptcha_check, so i assume your callback function is called _recaptcha_check()?