Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I want to show some CCK fields information of node on delete confirmation page abc.com/node/%/delete and also have to design it.
What is best possible way to do it :- 1)form_later, template preprocess in template.php, or theme registry....
Any one help me ?
Comments
Hi!You can use the next code
Hi!
You can use the next code to change description for node delete confirmation form:
function yourmodule_form_alter(&$form, $form_state, $form_id) {
if (arg(0) == 'node' && is_numeric(arg(1)) && arg(2) == 'delete') {
$node = node_load(arg(1));
if ($form_id == 'node_delete_confirm') {
if($node->type == 'story'){
$form['description'] = array('#value' => "Your new value"");
}
}
}
}
Also you can add some CCK fields information for form description field.
Best regards,
Dmitry.