Your postinst script should look like the following:
#!/bin/bashset -e. /usr/share/debconf/confmodulecase "$1" in configure) db_get test/input echo "you have entered ::$RET" >&2 ;;esacdb_stop