Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged forms



« Prev 1 Next »
Populate Fields from Post Data Add this to functions.php
0 775 posted 11 years ago by paddy1228
dynamically selects a value in a select according to what's already in the DB
0 668 posted 12 years ago by dato
0 696 posted 13 years ago by etechblog
Simple simple simple function to make a checkbox for a form. Retains checked status.
0 701 posted 13 years ago by brownrl
Come rendere uppercase un textbox senza bisogno di js
0 872 posted 13 years ago by tuffo19
I use the following code to prevent a user from getting a "webpage expired" message when hitting the back button on a page where the search results are also on the page with the form.
0 875 posted 13 years ago by bradless
Feel free to use this class however you'd like
0 887 posted 13 years ago by jschilling
0 758 posted 13 years ago by kidmizere
0 726 posted 14 years ago by picxelplay
For instance when you want to leverage the JElements in a admin view form...
0 831 posted 14 years ago by harikaram
processes contact form input and produces an auto reply
0 686 posted 14 years ago by sandman7OR
A handy, generic form processor which validates presence of fields marked in a hidden value, like: <input>. Easy to override and customize as needed. Adapted from a script found in PHP 5 Unleashed.
1 1018 posted 14 years ago by nate63179
By using hook_form_alter, you can add your own callback functions to any Drupal form. These functions will be called when Drupal validates the form and when Drupal submits it. In example below, a module called 'simple_checkout' adds its own hand...
1 802 posted 14 years ago by berkes
Variables that are submitted via web forms always need to be cleaned/sanitized before use in any way, to prevent against all kinds of different malicious intent.
0 700 posted 15 years ago by paulgrenwood
E-mail validation is perhaps the most used validation in web forms, this code will validate email address and also optionally check the MX records of the domain provided in email address to make email validation more robust.
2 924 posted 15 years ago by paulgrenwood
This is one of my favs to use and reuse. Essentially, we make a select box on what is in the table filled values/labels. Download the ISO countries list to make a country table and Bam! with this function you got a country select box... Also grea...
1 696 posted 15 years ago by brownrl
Quick little function to give you a select box for numbers ranging from min to max. Perfect for birthday date selectors.
0 688 posted 15 years ago by brownrl
I'm working on a web app that requires me to track nearly 300 form fields. To make this easier, and to allow me to handle special cases, I needed to assign them to an internal array. The switch/case statement makes this a breeze.
1 766 posted 16 years ago by mdrisser
If you had seen some errors in the code, please send me notice about it on the: [email protected] Thanks, K.Karpenko
1 792 posted 16 years ago by LoRd1990
1 995 posted 17 years ago by eethann
a function to check the validity of the postcode according to UK rules
0 3198 posted 17 years ago by valcartei
« Prev 1 Next »