Added "optionsFunction" to config

Instead of saving the options as array, completely will run the function given in the optionsFunction attribute of the config object and use the output array as the options for this textInput.