Restrict keys in Dlg

I want to ask the participants for s text input and wanted to use the dialogue box. Is it possible to restrict the keys that the participants would be able to use when filling the fields (for example, can only press the alphabet keys)?