DrupalBin
Submit Code
About
Recent Posts
Failed relationship
7 hours 2 min
ago
Fix for Code
8 hours 16 min
ago
Fix for Code
8 hours 20 min
ago
Fix for Code
8 hours 39 min
ago
more
Tags
CCK
fapi
jquery
menu
module
Panels
php
simpletest
template.php
test
theme
views
more tags
User login
Log in using OpenID:
What is OpenID?
Username:
*
Password:
*
Create new account
Request new password
Log in using OpenID
Cancel OpenID login
Home
Forms
Example of displaying multiple checkboxes, with one value selected
September 25, 2008 - 12:56am — Anonymous
$form
[
'option_occassions'
]
=
array
(
'#type'
=>
'checkboxes'
,
'#title'
=>
t
(
'Associated Occassions'
)
,
'#options'
=>
array
(
1
=>
"Formal"
,
2
=>
"Social"
,
3
=>
"Xmas"
,
checkboxes
fapi
Forms
Read more
hook_ alter_form Drupal5
September 9, 2008 - 3:50pm — Anonymous
function
cckwizards_form_alter
(
$form_id
, &
$form
)
{
if
(
$form_id
==
'deadlines_node_forms'
)
{
// This would put the lastnaam element at the bottom of the form.
Forms
Read more
Clearing cash so that a form re-freshes as if for the first time
September 8, 2008 - 7:32am — Anonymous
function
string_fields_form
(
$form
,
$pid
)
{
// somewhere about here I ought to force this form to actually destroy any previous ideas it had of itself and start over
db_query
Forms
Read more
Form in two steps
August 6, 2008 - 4:27am — Anonymous
//Form 1 (a page)
<?php
function
oferta_mes_form
(
)
{
$form
[
'#action'
]
=
url
(
'node/5'
)
;
//Importante, redirije con $_POST al siguiente form
$form
[
'fprecio'
]
=
array
(
Forms
steps
Read more
%crmapi_section doesn't get passed to form function
June 1, 2008 - 6:05pm — Anonymous
function
crmapi_menu
(
)
{
$items
=
array
(
)
;
$items
[
'crmapi/%crmapi_section'
]
=
array
(
'title callback'
=>
'crmapi_title'
,
'title arguments'
=>
array
(
1
)
,
Drupal 6
Forms
menu
Read more
Fix for Removing an element #process function, yuk!
April 30, 2008 - 3:16pm — Anonymous
/**
* Implementation of hook_elements().
*/
function
wysiwyg_elements
(
)
{
$type
=
array
(
)
;
$type
[
'textarea'
]
=
array
(
'#process'
=>
array
(
'wysiwyg_process_textarea'
)
)
;
Forms
formsapi
process
Read more
Removing an element #process function, yuk!
April 30, 2008 - 3:15pm — Anonymous
/**
* Implementation of hook_form_alter().
*/
function
wysiwyg_form_alter
(
&
$form
, &
$form_state
,
$form_id
)
{
$form
[
'#input'
]
=
TRUE
;
}
function
wysiwyg_process_form
(
$form
)
{
Forms
formsapi
process
Read more
Checkboxes and default_value from bldmtn
March 25, 2008 - 4:24pm — Anonymous
/**
* Implementation of hook_form(). A multistep form that pulls in content from the database and renders it into the form based
Forms
Read more