HTML Forms Generation and Validation PHP Class 1.0 BETA 2

Friday, January 05, 2007
,

A new version of the HTML Forms Generation and Validation PHP Class has been released. Read further to see what is new in this version of the script.

What's new in this version:

  • Fixed various bugs in code, example and documentation
  • in Firefox, trying to open the date picker would produce a JavaScript error
  • the icon for opening the date picker was not visible in Firefox

6 comments:

  1. Anonymous said...

    Can your form-builder class help me create forms which will interface with a database system?

    Specifically, there are a number of php/mysql database "helper" programs available (CakePHP, phpCodeGenie, phpMyEdit, PHPMaker, PHPRunner, and quite a few more). Each one has its own style of accessing (reading, writing) the fields of a database table.

    Ideally, a form builder would help with such a situation by allowing initialization (pre-fillout) and capture (post-fillout) according to the conventions of the particular system being used. Ideally, it would be possible to create a form and just supply the field and table name, and the form-maker would create the form using those conventions. (Of course the user would have to specify to the form-builder how each field reference is to be constructed.)

    I know perfectly well how challenging such a system would be to construct, but maybe your software could get me part way there? Or maybe I could enhance it to do so?

  2. Stefan Gabos said...

    My class is a generic form builder. What it does it helps you create HTML forms easily. It takes care of the output and of the validation. It's aim is to free the developer of the burden of writing the validation codes over and over again and to provide a unified style of output. Once you $frm->validate() returns true (meaning that the form is valid) it's up to you as how you handle the submitted data. And sure, you can automatize as much as you want the form generation process and I don't think that it would be such a great deal of work involved.

  3. elffikk said...

    Hi,
    thanks for a great job.
    I built some forms, and there was a problem with checkbox and radio elements. Could you help to fix them?
    They just aren't displayed!!
    Thanks again
    PS:
    I used a select with 2 option for a while, but steel waiting for new releases

  4. Stefan Gabos said...

    Ok, I figured it out: As the manual states:

    "Note that the name attribute of the control will have the value of $controlID, while the id attribute will be str_replace(" ", "_", $controlID . "_" . $value). So, if $controlID is "checkbox" and $value is "value 1", the control's actual ID will be "checkbox_value_1"

    Which simply means that if you add a radio (or a checkbox) control to your form and you do it like:

    $frm->add ("radio", "id", "value");

    in the template file you'd have to refer to it like

    {controls.id_value}

    and not
    {controls.id}!

  5. Anonymous said...

    i still cant get the form gen to work when i upload the file up

    Warning: add(../../datepicker/class.datepicker.php) [function.add]: failed to open stream: No such file or directory in /home/dwhoscom/public_html/test/htmlform/class.htmlform.php on line 172

    Fatal error: add() [function.require]: Failed opening required '../../datepicker/class.datepicker.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/dwhoscom/public_html/test/htmlform/class.htmlform.php on line 172

  6. Stefan Gabos said...

    from the error message i find that is quite obvious that you either forgot to also download the PHP Date Picker Class or you downloaded it but forgot to set the "datePickerPath" property of the form.

Post a Comment

GlossyBlue Blogger by Black Quanta. Theme & Icons by N.Design Studio
Entries RSS Comments RSS