Zend - The PHP Company




Forms

Add Code


another date drop-down-menu  

Type: code fragment
Added by: wibi
Entered: 24/04/2001
Last modified: 04/12/2000
Rating: **** (11 votes)
Views: 26883
If you make form with birtdate-field or any other date-fields then this simple script may be can help.


array to hidden fields  

Type: application
Added by: robF
Entered: 19/06/2000
Last modified: 09/12/2010
Rating: **** (8 votes)
Views: 19431
takes a multidimensional array and puts all the elements into HTML hidden input types so data can be carried through to another page


Auto fill drop down tables from a Access database  

Type: code fragment
Added by: gravestone
Entered: 26/04/2000
Last modified: 08/12/1999
Rating: **** (4 votes)
Views: 15629
Using this quick snippet you can auto fill your drop down boxes easily using microsoft access.


censormsg  

Type: application
Added by: hermawan
Entered: 03/11/2002
Last modified: 01/11/2001
Rating: - (fewer than 3 votes)
Views: 6347
This is a simple function which can be used when you have a form for your users to post their message and you want to censor every badwords that they might write on that form.


Check parameters validity  

Type: class
Added by: eovidiu
Entered: 03/11/2000
Last modified: 01/12/2000
Rating: - (fewer than 3 votes)
Views: 11671
Paranoia was designed to check the validity of the parameters that a php page will receive after a form submision. It can be used to check the variables sent by POST or GET


Create dynamic select boxes from a database with this function  

Type: code fragment
Added by: rayray
Entered: 02/08/2000
Last modified: 08/12/1999
Rating: **** (7 votes)
Views: 22794
This function allows you to pass in:
  • name
  • table
  • SQL statement
  • id
to generate a select box dynamically. Optionally you can pass in an $id to have it create a select box with a specific value set as "selected".


Dir 2 Box  

Type: code fragment
Added by: wibi
Entered: 05/07/2001
Last modified: 09/12/2007
Rating: ***** (3 votes)
Views: 10376
This function will read a directory and put the result into a listbox. So you can choose a file from that listbox.


Drop down list  

Type: code fragment
Added by: idban
Entered: 03/03/2000
Last modified: 08/12/1999
Rating: *** (10 votes)
Views: 18991
list your database to drop down menu


Dynamic dropdown box function  

Type: code fragment
Added by: to21
Entered: 07/06/2002
Last modified: 06/12/2001
Rating: - (fewer than 3 votes)
Views: 15586
This function updates the second box, depending on the selection of first box. Adapted from code by Leon Atkinson.


Field Forwarder  

Type: class
Added by: sfullman
Entered: 27/11/2002
Last modified: 01/11/2001
Rating: **** (5 votes)
Views: 17165
This function is great for when you have a multi-page form such as an application. This function forwards fields on one page to hidden fields on the next page, and so on. Very simple to call. The beauty of it is, it also will handle arrays with multiple dimensions. If you have a field with the same name on the next form, it's a good rule to call field_forwarder() at the BEGINNING of your form so that when that form is passed, the field (with the same name) will overwrite the previous form. It's also good to put field_forwarder() at the top so the final page will have all the fields in the order of the application. This is a recursive function, i.e. it re-calls itself when it encounters form elements that are arrays such as: Finally, if you wish to print out PHP code of the array instead of hidden fields, add this line right before you call field_forwarder(): $FFoutputType = 'print'; and it will print out, in text form, the values of the fields as php variables -- this is great for storing php code in a database.


Form Generator  

Type: class
Added by: hubidubi
Entered: 11/06/2002
Last modified: 07/12/2001
Rating: - (fewer than 3 votes)
Views: 17379
Form generator which waits for an array and gives back a full input form. It can process the data (insert, update, delete) Now supports file upload and styles


Formage  

Type: code fragment
Added by: wibi
Entered: 20/05/2001
Last modified: 05/12/2000
Rating: **** (3 votes)
Views: 10481
A complete formfield function minus listbox function, you can make textbox, radio button, checkbox, textarea, button and form opening function.

You can obtain listbox function from my previous posting
( another date drop-down-menu and make listbox from array or database-table )



FormCollector  

Type: class
Added by: riettasolutions
Entered: 23/09/2002
Last modified: 09/12/2001
Rating: - (fewer than 3 votes)
Views: 8090
Over the summer I wrote a utility class to make it easy to pull information from HTML forms and place into databases and do various manipulations on arrays without having to write much special code for each case. I have used this class library from everything from a member management database to secure credit card updating utility. Key features: 1. Return array data where field keys match a certain prefix such as CUSTOMER_, CREDITCARD_ (even from HTTP_POST_VARS). 2. Create MySQL Insert, Update, and basic Create Table statements from associative array data. Note: There is a lot of code here and it is very useful. The documentation could definitely be better, but I do not have enough time to document this as well as I would a commercial product for the time being. The code is intended to be readable and each function should have a �JavaDoc like� header. I welcome comments and/or additions to this library class.


Formwizard  

Type: class
Added by: phpjuggler
Entered: 22/05/2002
Last modified: 08/12/2003
Rating: - (fewer than 3 votes)
Views: 11879
With this little class you can create update or insert forms. It's so easy and useful


Generate array of radio-buttons  

Type: code fragment
Added by: ADMIN
Entered: 12/01/2000
Last modified: 08/12/1999
Rating: **** (4 votes)
Views: 9661
This code produces a set of radio-buttons with given name, with values and texts taken from the array


Generate options array for select  

Type: code fragment
Added by: ADMIN
Entered: 12/01/2000
Last modified: 08/12/1999
Rating: - (fewer than 3 votes)
Views: 9267
This code produces a list of OPTION tags from an array, array keys being option values and array items being option texts. It will also pre-select items from the second argument


make listbox from array or database-table  

Type: code fragment
Added by: wibi
Entered: 07/05/2001
Last modified: 05/12/2000
Rating: - (fewer than 3 votes)
Views: 12742
This script contain 2 function to make a drop-down-menu from an array and from mysql-database table.


On the fly multiple form entry creator  

Type: code fragment
Added by: TooNice
Entered: 02/03/2001
Last modified: 03/12/2000
Rating: *** (3 votes)
Views: 9320
This script allows you create a multiple entry form on the fly. The end-user determines how many entries they want and the form is created accordingly.


Option Generator  

Type: code fragment
Added by: ralexander
Entered: 01/03/2001
Last modified: 03/12/2000
Rating: - (fewer than 3 votes)
Views: 5908
This function takes three arguments and returns your option code. All you have to do is provide the form and select code as in the example. ;-]


PassHiddenVars  

Type: application
Added by: jhilgeman
Entered: 24/04/2001
Last modified: 04/12/2000
Rating: - (fewer than 3 votes)
Views: 7662
Takes variables posted from the previous page's form, and converts them to hidden inputs so they can be passed along multiple page forms.


Phorm Jr.  

Type: application
Added by: Darguz
Entered: 15/03/2000
Last modified: 03/12/2001
Rating: ***** (5 votes)
Views: 21942
Form processing program. A trimmed-down version of the popular Phorm script, Phorm Jr. has just email, acknowledgement and text log capabilities, but with the same security and error-handling features of its big brother.


Query String Generator  

Type: code fragment
Added by: eddyf
Entered: 02/03/2000
Last modified: 08/12/1999
Rating: *** (4 votes)
Views: 10048
Generates a query string from POST'ed form variables.


radio button selecter  

Type: code fragment
Added by: deathray
Entered: 06/08/2004
Last modified: 08/12/2003
Rating: - (fewer than 3 votes)
Views: 6224
This is a simple way to set and get values from a readio button or drop down box. Less code than other methods.


Required  

Type: code fragment
Added by: RLYNCH
Entered: 13/02/2000
Last modified: 08/12/1999
Rating: *** (9 votes)
Views: 14621
A rudimentary sample of how to require elements of a form to be filled out.


Simple HTML controls generator library  

Type: class library
Added by: Boba
Entered: 03/03/2000
Last modified: 08/12/1999
Rating: ***** (9 votes)
Views: 13620
Allows to generate HTML controls as SELECT, RADIO, CHECKBOX from PHP arrays.


Smarty Autosetup form plugin  

Type: class library
Added by: borislav_nedelchev
Entered: 17/03/2006
Last modified: 03/12/2005
Rating: - (fewer than 3 votes)
Views: 5014
Autosetup Smarty plugin capture forms controls from smarty templates and populate it's value attributes with values provided by user callback function.


user data type validation  

Type: class
Added by: partyzan
Entered: 22/08/2001
Last modified: 08/12/2000
Rating: - (fewer than 3 votes)
Views: 11167
Validation class for user submitted data. I had many times had to make sure people submitted the right kind of data into form fields. After writting many functions in many places. I've decided to compose on that i can use all the time


Very simple option control  

Type: code fragment
Added by: kyong
Entered: 19/02/2001
Last modified: 02/12/2000
Rating: - (fewer than 3 votes)
Views: 8059
I was not so comfortable with this one( http://zend.com/codex.php?id=59&single=1 ) So, I simplified the one enough to feed me.



Search



This Category All Categories