You just answered your own question

on *:dialog:name:init:*:did -f name id

is the easiest way.

Stop arguing with the responses.