Where Are Your Offices Located?

I’m looking for an easy to use, reasonably complete form validation solution for php. I recall using one years ago that used a few tags on the HMTL side then captured the OB to replace them with some pretty serious code. This feels slightly like overkill me, yet I’m not REALLY wanting to go nuts with my own right now. I’m using SMARTY, so anything I use should not throw too many curve balls.

I’m going to be validating the basics, name, address, email, credit card number (format validation OK)…

Any ideas? Thanks folks!

1 ANSWERS

16 febrero, 2017 a las 10:24 am admin

Since you are already using Smarty, you may want to consider the PEAR package HTML_QuickForm (this page says it’s being replaced by v2, but that’s still in alpha. V1 is pretty solid).

The package allows you to build and process your forms in an easy, straightforward API, and then has a renderer class that works with Smarty. Basically, you can spit out your entire form as an array of objects that Smarty can then render for you. You can control the look and feel with CSS. HTML_QuickForm can be configured to have client-side or server-side validation, or both. You just set up your rules for validation, and it just works. Hope that helps.

Viendo 1 respuesta (de un total de 1)

You must be logged in to reply to this topic.