Just to add onto what I said previously, I didn't realise you could do this until now, but you can use the custom identifiers in the actual dialog table. This is a working dialog, and it's very modular:

Code:
alias -l id_prefixtext return 1
alias -l id_prefix return 2
alias -l id_suffixtext return 3
alias -l id_suffix return 4
alias -l id_options return 5
alias -l id_ok return 6
alias -l id_cancel return 7
alias -l id_apply return 8

dialog -l ncconf {
  title "Nick Completion Configuration"
  size -1 -1 132 114
  option dbu
  text "Prefix:", $id_prefixtext, 1 2 16 8
  edit "", $id_prefix, 18 1 47 10, autohs
  text "Suffix:", $id_suffixtext, 68 2 16 8
  edit "", $id_suffix, 85 1 47 10, autohs
  list $id_options, 0 11 132 90, check size
  button "&Ok", $id_ok, 55 102 25 12
  button "&Cancel", $id_cancel, 81 102 25 12
  button "&Apply", $id_apply, 107 102 25 12
}


I'm going to be coding all of my dialogs like this from now on.