Do you mean create a textbox dynamically at runtime? I don't believe that is possible. You can create it and "hide" it by default and then use functions to display/hide it within the form. There is an example of something like this in the "out of the box" pre-defined content that comes with PAM.
And under the script button in a form design there are functions for reading from a database.