You are here

function hook_node_import_defaults in Node import 6

List the FAPI elements to set the default values for each field.

Use this hook to allow users to set the default value for each of the content fields. You can also use this hook to set some static default values for each object by returning a form element like:

$form['some field'] = array(
  '#type' => 'value',
  '#value' => 'some value',
);

See hook_node_import_values() for an alternative way to set static (or dynamic) default values.

Parameters

$type: String. The content type as returned as a key by hook_node_import_types().

$defaults: Array of the currently filled in values for the defaults page.

$fields: Array of fields available for this type.

$map: Array of how the file columns are mapped to the fields.

Return value

Array of form elements.

Related topics

18 functions implement hook_node_import_defaults()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

book_node_import_defaults in supported/book.inc
Implementation of hook_node_import_defaults().
comment_node_import_defaults in supported/comment.inc
Implementation of hook_node_import_defaults().
domain_node_import_defaults in supported/domain/domain.inc
Implementation of hook_node_import_defaults().
filefield_node_import_defaults in supported/filefield/filefield.inc
Implementation of hook_node_import_defaults().
imagefield_node_import_defaults in supported/imagefield/imagefield.inc
Implementation of hook_node_import_defaults().

... See full list

1 invocation of hook_node_import_defaults()
node_import_defaults in ./node_import.inc
Returns a list of default (form elements).

File

./node_import.api.php, line 360
Explanation of the Node import hooks.

Code

function hook_node_import_defaults($type, $defaults, $fields, $map) {
}