I have a set of fields that have been defined in an xml file and then I load the fields with $form->loadFile('myFormName'). Before displaying the fields I would like to manipulate the fields based on a series of parameters defined in the config. I was looking at the joomla profile plugin and the onContentPrepareForm function is doing something very similar to what I want to do. However I see that list fields that are to be manipulated are manually defined in an array.
I have looked through the joomla API but I have not found a function that will return a list of fields. Is there a way to generate dynamically the list of fields from the information that has been loaded with $form->loadFile('myForm')?