with this small change, drupal_delete_add_form_elements() becomes a far more flexible function. it was originally written just to help handle building the multiple delete confirm screens, but this tweak enables it to be used generally anywhere that a module would like to inject a piece of a form into a confirm screen. great use case is for putting a message into the confirm form directly from hook_nodeapi 'delete' op.

initial testing is good. i'll run a few more tests to make sure it doesn't break any current functionality...

CommentFileSizeAuthor
#4 dapi_form_elements.patch1.56 KBhunmonk
dapi_35.patch1.03 KBhunmonk
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hunmonk’s picture

Status: Needs review » Reviewed & tested by the community

tested extensively -- this works beautifully and makes the function much more powerful.

hunmonk’s picture

Category: feature » bug
Priority: Critical » Normal

this is actually a bug in the code -- the function should be able to be called from anywhere once a package is open.

pwolanin’s picture

I tested the patch as far as adding elements to the confirm form via hook_nodeapi and it worked for me.

hunmonk’s picture

Title: make drupal_delete_add_form_elements() more flexible. » make adding data more flexible in deletion api
FileSize
1.56 KB

metadata would also benefit from the recursive merging that the form elements were moved to. attached patch implements this. tested and ready to go.

hunmonk’s picture

Assigned: hunmonk » Unassigned
webchick’s picture

Status: Reviewed & tested by the community » Closed (won't fix)

Deletion API was rolled back.