DrupalBin
Submit Code
About
Recent Posts
admin settings not saving
14 min 48 sec
ago
Code
57 min 56 sec
ago
Code
1 hour 13 min
ago
css path
2 hours 57 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
Fix for AHAH helper - not yet working
View
Download
Fix
This fix will not be saved to the database until you submit.
Summary:
Tags:
Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Source code:
*
<?php function &ahah_helper_get_form_element($form, $parents) { // Allow $parents to be either an array of the element's parents or the name // of an element. if (strpos($parents, ']') !== FALSE) { $parents = explode('][', $parents); } // Recursively seek the form element. if (count($parents)) { $parent = array_shift($parents); return ahah_helper_get_form_element($form[$parent], $parents); } else { return $form; } } // Usage: $form_element &= ahah_helper_get_form_element($form, $form_element_name); // Problem: // $form_element == int(0)
Syntax highlighting mode:
ActionScript
ColdFusion
Diff
Drupal
Drupal 5
Drupal 6
HTML
Javascript
MySQL
PHP
Python
robots.txt
SQL
Text
Select the syntax highlighting mode to use.