You are here

function prepopulate_after_build in Prepopulate 5

Same name and namespace in other branches
  1. 8.2 prepopulate.module \prepopulate_after_build()
  2. 6.2 prepopulate.module \prepopulate_after_build()
  3. 7.2 prepopulate.module \prepopulate_after_build()

Implementation of prepopulate_after_build().

1 string reference to 'prepopulate_after_build'
prepopulate_form_alter in ./prepopulate.module
Implementation of hook_form_alter().

File

./prepopulate.module, line 37
Fill form elements with data from GET.

Code

function prepopulate_after_build($form_id, &$form) {
  $node = $form['#node'];
  if (isset($_GET['edit'])) {
    foreach (array_keys((array) $_GET['edit']) as $getvar) {
      if (element_child($getvar) && is_array($form) && !is_null($form[$getvar]) && $form[$getvar]['#type'] != "value") {
        if (!isset($form[$getvar]['#access']) || $form[$getvar]['#access'] != FALSE) {
          _prepopulate_get_walk($form[$getvar], $getslice[$getvar]);
        }
      }
    }
  }
}