reset input field if before_add returns -1
do not manually uri encode query string, already being handled by jquery