The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
![]() |
Numerical Order - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5) +--- Thread: Numerical Order (/showthread.php?tid=494) |
Numerical Order - ironclaw - Feb 4th, 2010 Hi Folks, Looking for some help on this one. I'm using a HTML form with 8 fields directed at Form Tools as a backend. The fields are: First Field - An Email Address field Fields 2 - 7 are boxes (or drop downs) that are to accept numbers up within a certain range (1 to 99) I'm trying to modify process.php in FormTools to do the following: 1) Check email isn't already in database and its valid (Simple @ symbol check), if not, reject form and redirect 2) Check all numbers are within the range, if not, reject form and redirect 3) Put numbers in numerical order regardless of which field they were entered in 4) Enter in SQL Database with FormTools But my PHP really isn't up to the task. Any help or even a pointer would be great! Is modifying process.php the best way to do this, or perhaps could the form page be scripted in PHP to do this, then the info sent to process.php Best Regards, ironclaw RE: Numerical Order - Ben - Feb 6th, 2010 Hey Ironclaw, Probably the best approach would be to use the API for your form rather than using submitting the form directly to Form Tools' process.php page. If you have it configured, you don't need to re-add it via Form Tools admin UI, you can just edit your form to use the API instead. The reason I'd suggest using the API is because of the following:
So the API would really fit the ticket very well! But yes, it does require dabbling in the PHP a little, which is unfortunate. But these tutorials should really help: - Adding a single-page form with the API - Adding server-side validation to your forms Hope this info at least gets you on the right track - Ben |