function prepopulate_form_alter in Prepopulate 6
Same name and namespace in other branches
- 8.2 prepopulate.module \prepopulate_form_alter()
- 5 prepopulate.module \prepopulate_form_alter()
- 6.2 prepopulate.module \prepopulate_form_alter()
- 7.2 prepopulate.module \prepopulate_form_alter()
Implementation of hook_form_alter().
File
- ./
prepopulate.module, line 26 - Fill form elements with data from GET values.
Code
function prepopulate_form_alter(&$form, $form_state, $form_id) {
if (isset($_REQUEST['edit'])) {
foreach (array_keys((array) $_REQUEST['edit']) as $getvar) {
if (element_child($getvar) && !is_null($form[$getvar])) {
_prepopulate_get_walk($form[$getvar], $_REQUEST['edit'][$getvar]);
}
}
}
}