Welcome To Snipplr
Everyone's Recent PHP Snippets Tagged form
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Simple script to send SMS throught our HTTP API (Afilnet) with PHP. Steps:
1.- Register in Afilnet. http://www.afilnet.com/anunciante/registrar.php
2.- Login and get credits (10 free) to send SMS
3.- Use this script or html form example include in...
1
1067
posted 9 years ago by Afilnet
Translate non alphanumeric characters into an underscore. Doesn't create double underscores if there's two spaces in a row. Also turns name to lowercase. Use with trim to avoid spaces at front or end.
0
1519
posted 9 years ago by flatearthcomms
Within your view, you place something like:
<?=>session->flashdata('feedback') ?>
0
628
posted 13 years ago by screon
Simply define your POSTURL and POSTVARS in name = value string format. It will post the form.
0
954
posted 13 years ago by kumar_sekhar
This generates a simple insert statement for mysql based on all the variables in $_GET or $_POST using a simple page. It does not do the inserts although that is a simple addition - just builds and displays your insert statement.
1
1256
posted 13 years ago by kidmizere
PHP
Preserving Form Elements by creating hidden form elements on new page based on previous page's form submit
I made this function to render hidden form elements in a new page based on what was sent from the last form. This function can be used to preserve input from a long multiple-page form.
What does it do:
1. Go through all the submitted POST eleme...
0
884
posted 13 years ago by chopbust
I thought this was pretty elegant code and wanted to share it with anyone who found it useful.
0
786
posted 13 years ago by mattneary
This was a fix for the form that allowed me to automatically replace the text when I focused on area.
Find the file text.php inside modules. Replace line 89 with this code.
0
915
posted 13 years ago by gera3d
Here is a little bit of code I use from time to time to make a generic some what safe date selector for forms. I wanted something easy, small, and not relying on images, jquery, libraries, etc... Most importantly I wanted the date that was selected t...
0
696
posted 14 years ago by brownrl
formulário para enviar para os emails de acordo com o departamento escolhido no Select
0
642
posted 14 years ago by rbulgueroni
run as callback from form_validation->setrules
ex:
$this->form_validation->set_rules('cc_number','Credit Card #','required|max_length[20]|callback_alpha_dash_space');
0
788
posted 14 years ago by myke
On Zend Framework you can add options on Select Element on Form.php or Controller Action, and after you can disable it, on Form.php or Controller.php too.
1
1204
posted 14 years ago by postNuKe
After i saw this snippet http://snipplr.com/view/33790/form-country-code-select-with-if-selected-test/ i wanted to make the code better :D
To make it easier to maintain
0
938
posted 14 years ago by cigraphics
Frequently I like to make data more user friendly, so while I make it easy for them to add a date as a shorthand format (mm/dd/yyyy) I like to return it as something easier to digest (Day of Month in Year, etc). This is the simplest way to do that I'...
0
804
posted 14 years ago by xekonic
Resizing fields using a custom module
You could also resize the field using a custom module.
For example, if you created mysite.module, you could use something like this to reduce the field size to 30 characters
4
1013
posted 14 years ago by marcelodornelas