DrupalBin
Submit Code
About
Recent Posts
Fix for Code
5 hours 7 min
ago
Fix for Code
5 hours 8 min
ago
Code
5 hours 13 min
ago
whole thing
6 hours 5 min
ago
more
Tags
CCK
drupal
fapi
jquery
menu
module
Panels
php
simpletest
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
Form API
Two identical forms need different handling
August 17, 2008 - 6:27am — Anonymous
function
oneatatime_form
(
$form_state
,
$translations
,
$node_source
,
$lang
)
{
global
$user
;
$form
= single_string
(
$form_state
,
$translations
,
$node_source
,
$lang
)
;
return
$form
;
Form API
Read more
I want something like the roles list checkbox in the user form, only with languages (almost there)
July 31, 2008 - 8:58am — Anonymous
function
trans_languages_form
(
&
$form
)
{
$sql
=
"SELECT language, name, native FROM {languages} order by name"
;
$result
=
db_query
(
$sql
)
;
$form
[
'trans_languages'
]
=
array
(
Form API
user
Read more
Fix for I want something like the roles list checkbox in the user form, only with languages
July 31, 2008 - 8:35am — Anonymous
function
trans_languages_form
(
&
$form
)
{
$sql
=
"SELECT language, name, native FROM {languages} order by name"
;
$result
=
db_query
(
$sql
)
;
$form
[
'trans_languages'
]
=
array
(
Form API
user
Read more
I want something like the roles list checkbox in the user form, only with languages
July 31, 2008 - 8:34am — Anonymous
function
trans_languages_form
(
&
$form
)
{
$sql
=
"SELECT language, name, native FROM {languages} order by name"
;
$result
=
db_query
(
$sql
)
;
$form
[
'trans_languages'
]
=
array
(
Form API
user
Read more
Broken form api + theme_table usage
July 25, 2008 - 10:49pm — Anonymous
<?php
function
brokn_menu
(
$maycache
)
{
$items
=
array
(
)
;
if
(
!
$may_cache
)
{
$items
[
]
=
array
(
'path'
=>
'brokn/1'
Form API
theme_table
Read more
Ejemplo de select. Form API
July 22, 2008 - 6:39am — Anonymous
//$meses array que la key es el "valor" retornado, y el valor es el nombre mostrado, ejemplo
$meses
[
1
]
=
"Enero"
;
$meses
[
2
]
=
"Febrero"
;
$meses
[
3
]
=
"Marzo"
;
$meses
[
4
]
=
"Abril"
;
$meses
[
5
]
=
"Mayo"
;
Form API
Read more
cram.module for Drupal 6, with mutilated hook_auth into new FormAPI thingy
February 19, 2008 - 12:31pm — Anonymous
<?php
// $Id: cram.module,v 1.7 2008/02/19 05:46:07 selmanj Exp $
/**
* Implementation of hook_menu().
*/
function
cram_menu
(
)
{
$items
[
'admin/settings/cram'
]
=
array
(
CRAM
Form API
hook_auth
Read more