Recent Posts
- (09/10) Fixing Warning: the ECDSA host key for 'github.com' differs from the key for the IP addressTAGS:Web Server Admin
- (12/26) CakePHP 3 - Getting List of Column Definitions from a Table (like schema())TAGS:CakephpCake3
- (09/14) Change Order of Loaded Behaviors in CakePHP 3TAGS:Cake3CakephpWeb ProgrammingPhp
- (05/29) CakePHP 3 - Accept JSON Header Only Working When Debug FalseTAGS:Web ProgrammingCakephpCake3
- (05/23) Remove All Events from Google Calendar (Reset Calendar)TAGS:Web ProgrammingPhp
- (11/08) Google Tag Manager (GTM) Not Firing Default PageView EventTAGS:Web ProgrammingJavascriptGoogle Tag Manager
- (10/13) In PHP, how do you get __toString() Magic Method Result without calling echo?TAGS:CakephpCake3Cakephp 13PhpWeb Programming
- (11/14) Getting output from shell_exec() at all timesTAGS:Web ProgrammingWeb Server Admin
Subscribe to my feed
MainelyDesign.com Blog
Forms Tagged Blog Posts
Which Submit Button was Clicked in CakePHP? Use Name.
Posted on 03/04/2010 at 12:01 pm | Viewed 26,199 times | 2 comments
If you want to have multiple submit buttons that make a form do different things there's a simple way to do this. The name of the submit button that was clicked by the user will be sent (via POST) with all the other POSTed data. This is very handy if you want to have a cancel button and continue button. In CakePHP the name of the button won't be in $this->data, but it's easy enough to get...
Read: Which Submit Button was Clicked in CakePHP? Use Name. | View: Comments
A Really Good Implementation of Captcha
Posted on 09/22/2009 at 02:45 pm | Viewed 11,681 times | 0 comments
Awesome Captcha Implementation
I just experienced a version of Captcha that I actually like. Instead of having to type in jumbled letters and phrases or answering simple questions, Service2Client actually asks you to identify the color of the letter in a certain position. Not only does it fool spambots (I would assume anyway) but it's pretty easy to understand.
Read: A Really Good Implementation of Captcha | View: Comments
Date Input Using Cakephp Form Helper
Posted on 09/09/2009 at 03:29 pm | Viewed 32,829 times | 3 comments
I always forget what exactly needs to happen in order for CakePHP's form helper to work with date input fields. I'm sick of tearing through old source code and looking at the official CakePHP docementation site. Here's how to get it to work...
Date Inputs Using the Form Helper:
$current_year = date('Y'); $max_year = $current_year + 2; echo $form->input('dateSelectBoxes', array('type'=>'date', 'selected'=>$unix_timestamp, 'empty'=>true, 'minYear'=>2009, 'maxYear'=>$max_year));
Checkbox - setting the default state
Posted on 04/17/2009 at 08:31 am | Viewed 14,921 times | 0 comments
I ran across a rather simple problem (I thought) that took a little searching to figure out. All I had to do was create a checkbox form input that I wanted to have checked by default. I tried 'default'=>'checked', which didn't work. I also tried 'checked'=>true and 'checked'=>1, but that works every time, even if validation fails and the user had unchecked the checkbox, it will be checked again (Not good usability).
Full Tag List
- Cakephp
- Web Programming
- Site Avenger
- Excel
- Csv
- Database
- Saveall
- Vendors
- Import
- Truncate
- Empty Table
- Forms
- Habtm
- Usage
- Tinymce
- Geshi
- Usability
- Upgrade
- Graphic Design
- Internet Marketing
- Software
- From The Hip
- Midcoast Magnet
- User Group
- Component
- Mssql
- Git
- Apache
- Seo
- Htaccess
- Mysql
- Eclipse
- Gear
- Photoshop
- Php
- Css
- Iis
- Web Server Admin
- 404 Errors
- Iisreset
- Web Design
- Hack
- Internet Explorer
- Ie
- Firefox
- Forum Answers
- Jquery
- Swfupload
- Windows
- Example
- Links
- Tutorial
- Errors
- Behaviors
- Cakephp 13
- Humor
- Music
- Jquery Ui
- Ui
- Wamp
- Cloudfiles
- Setup
- Javascript
- Responsive
- Quick Tip
- Cake3
- Foundation
- Google Tag Manager