Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95112 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31911 invoked from network); 13 Aug 2016 10:37:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Aug 2016 10:37:19 -0000 Authentication-Results: pb1.pair.com header.from=lester@lsces.co.uk; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=lester@lsces.co.uk; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lsces.co.uk from 217.147.176.230 cause and error) X-PHP-List-Original-Sender: lester@lsces.co.uk X-Host-Fingerprint: 217.147.176.230 mail4-3.serversure.net Linux 2.6 Received: from [217.147.176.230] ([217.147.176.230:39804] helo=mail4.serversure.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B1/98-55605-D58FEA75 for ; Sat, 13 Aug 2016 06:37:18 -0400 Received: (qmail 10415 invoked by uid 89); 13 Aug 2016 10:37:14 -0000 Received: by simscan 1.3.1 ppid: 10409, pid: 10412, t: 0.0851s scanners: attach: 1.3.1 clamav: 0.96/m:52/d:10677 Received: from unknown (HELO ?10.0.0.7?) (lester@rainbowdigitalmedia.org.uk@81.138.11.136) by mail4.serversure.net with ESMTPA; 13 Aug 2016 10:37:14 -0000 To: internals@lists.php.net References: <10fbcb03-5de8-4d9a-da1c-7e2bf77937cb@lsces.co.uk> <5657afc7-7569-5fc4-4a5a-27ed786c4fa5@gmail.com> <0825c173-5cb4-7f65-cf34-b45ca30919a3@lsces.co.uk> <8646c3ad-b929-cb0b-bad4-52a0a7160d16@gmail.com> <11ce571b-964b-5a3e-9f2f-3f69a8bc20b4@lsces.co.uk> <7d9db8d5-ae7a-4123-14f4-f76fb6d764c5@gmail.com> <1e14c4b9-65ce-4742-589f-19fe9290be0f@lsces.co.uk> <19.08.55605.BE4EEA75@pb1.pair.com> Message-ID: <58e04372-d21c-71eb-0810-91d0073ec7ec@lsces.co.uk> Date: Sat, 13 Aug 2016 11:37:14 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2 MIME-Version: 1.0 In-Reply-To: <19.08.55605.BE4EEA75@pb1.pair.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Simple variable handling. From: lester@lsces.co.uk (Lester Caine) On 13/08/16 10:14, Tony Marston wrote: > I do not see that complicating the language by making it do what SHOULD > be done in userland code is a good idea. Helping 1% of users while > hindering the remaining 99% is not an idea which should EVER be > contemplated. I'm currently looking to 'modernise' forms that are still using hard coded mechanisms for validation in the browser and cross checking in the PHP end. What I can not find is a tidy 'modern' method of handling the building of forms without having to hand write javascript and other elements of form building. I'm based on Bootstrap3 for the layout and css side of things and have just 'invested' in a copy of FormValidation as it seems to do a good job of producing all the javascript side while still working html in the smarty templates. I'd rather be using open source code I can extend, but nothing I've found seems to work. The next step is to produce slices of forms as templates each of which can be populated from the rules attached to a variable. In the absence of any standard for handling that in PHP directly I will probably resort to using the SQL schema to provide the rules since essentially the captured data will end up in a database anyway. I can extend ADOdb to provide a more comprehensive field description for each variable to populate the smarty templates. It would be nice though to have that information more centrally accessible in PHP so the various third party systems can standardise on using them? The schema based material is not visible via phpdocumentor which sort of pushes expanding the docblock alternatives instead. Of cause to add to the fun. Having got a new style form working, I've dropped the UK NI Number validation regex into FormValidator ... and it's not working :( The regex as been used for years in hand coded javascript and is clean in the checker program, just not producing a match in FV :( -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk