DrupalBin
Submit Code
About
Recent Posts
Fix for Code
Code
Code
Fix for YesCT make an acronym
YesCT make an acronym
Code
block_menu
Node lookup
Fix for Video tag RegExp
Video tag RegExp
more
User login
Log in using OpenID:
What is OpenID?
Username:
*
Password:
*
Log in using OpenID
Cancel OpenID login
Create new account
Request new password
Tags
CCK
drupal
fapi
jquery
menu
module
Panels
simpletest
test
theme
user
views
more tags
Home
hook_form_alter
Fix for hide preview button
January 6, 2010 - 1:52am — Anonymous
<?php
function
mymodule_form_alter
(
$form_id
,
&
$form
)
{
switch
(
$form_id
)
{
case
'mycontenttype_node_form'
:
unset
(
$form
[
'preview'
]
)
;
break
;
}
}
?>
hook_form_alter
Fix for Confirm Submission of Form
October 22, 2009 - 11:55pm — Anonymous
<?php
function
nodetype_submit_form_alter
(
&
$form
,
$form_state
,
$form_id
)
{
if
(
$form_id
==
'twittamentary_node_form'
)
{
$form
[
'form_array'
]
=
array
(
'#value'
=
>
'<pre>'
.
print_r
(
$form
,
1
)
.
confirm
hook_form_alter
javascript
submit
Read more
Confirm Submission of Form
October 22, 2009 - 11:31pm — Anonymous
<?php
function
nodetype_submit_form_alter
(
&
$form
,
$form_state
,
$form_id
)
{
if
(
$form_id
==
'twittamentary_node_form'
)
{
$form
[
'form_array'
]
=
array
(
'#value'
=
>
'<pre>'
.
print_r
(
$form
,
1
)
.
confirm
hook_form_alter
javascript
submit
Read more
Anonymous Track
September 21, 2009 - 4:18pm — Anonymous
/**
* Implementation of hook_init().
*/
function
anonymous_track_init
(
)
{
global
$user
;
// Setup session id
$sessid
=
session_id
(
)
;
// Setup commons variables
$user_ip
=
$_SERVER
[
'
hook_form_alter
hook_init
track
user
Read more
AAAAAAAAAAAAAAAAAAAAAAAAAAAARGH
August 7, 2009 - 9:53am — Anonymous
print
' - HFA '
;
print_r
(
$form
[
'#id'
]
)
;
// output is: - HFA node-form - HFA devel-switch-user-form - HFA devel-execute-form - HFA search-theme-form
if
(
$form
[
'#id'
]
==
'node_form'
)
{
/
hook_form_alter
Read more
hook_form_alter doesn't modify screen display
June 18, 2009 - 2:02pm — Anonymous
function
artleagueli_form_alter
(
&
$form
,
&
$form_state
,
$form_id
)
{
switch
(
$form_id
)
{
case
'registration_node_form'
:
$form
[
'field_class_name'
]
[
'#description'
]
=
t
(
'New description
hook_form_alter
Read more
AssitszesliaincInimb
June 3, 2009 - 9:47pm —
GeltyImatly
<
a href=
"http://daya0.is-the-boss.com/may921june.html"
>
jimmy morris pitcher
</
a
>
<
a href=
"http://newdaynu.is-the-boss.com/may1394june.html"
>
no retreat law
</
a
>
<
a href=
"http://americn.is-the-boss.com/ma
CCK
hook_form_alter
Read more
Code
March 25, 2009 - 4:39pm — Anonymous
<?php
// $Id$
/**
*Unset non-essential elements of the form add and edit pages.
* Auth: Doug Vann
* http://dougvann.com
* http://www.twitter.com/dougvann
*/
admin_edit
custom module
dougvann
hook_form_alter
usability
Read more
Code
March 3, 2009 - 1:18pm — Anonymous
function
mymodule_form_alter
(
&
$form
,
$form_state
,
$form_id
)
{
if
(
$form_id
==
'search_form'
)
{
$form
[
'basic'
]
=
array
(
'#type'
=
>
'item'
,
'#title'
=
>
'cool'
)
;
}
}
hook_form_alter
search form
hide preview button
February 18, 2009 - 6:07pm — Anonymous
<?php
function
mymodule_form_alter
(
$form_id
,
&
$form
)
{
switch
(
$form_id
)
{
case
'mycontenttype_node_form'
:
unset
(
$form
[
'preview'
]
)
;
break
;
}
}
?>
hook_form_alter
1
2
next ›
last »