Tuesday, March 28, 2006


This could be something big in PHP!

I have read articles about FORM issues in PHP, and making
something that will be easy for:

  1. JS Validation
  2. PHP Validation
  3. FORM creation
  4. ----
  5. I want the previous values of the form to still be there
  6. I want error msgs
  7. I want form themes
  8. I want reusable components
  9. I want scrollbars!
  10. I want cookies (real cookies, and milk plz lol)
  11. I want it to be simple (KISS)
  12. I want it to be OO

require "FormObjectTemplates.inc.php"
$formObj = new FormAll();
// The templates would have their own JavaScript validation
$formObj->addTextFromTemplate('name', txtName);
$formObj->addTextFromTemplate('howYouFeel', txtOneLineDescription);
$formObj->addCombo('cbBlah', 'Blah');

// This is PHP for submitting the form
$goodMessage = $formObj->getValidationMessage();
$error = $formObj->getValidationMessage();
// What we could do is instead of having validation problem MESSAGES
// We could send back objects so we can show an ERROR image right next
// To the form input that was invalid with a brief message of what went wrong.
<script type="text/javascript">

Comments: Post a Comment

<< Home


March 2006   April 2006  

This page is powered by Blogger. Isn't yours?