how to create dynamic CFormModel member variables

Hi,

I am trying to develop a form using CFormModel, the form fields are dynamic in nature as I am fetching the form fields from a third party API.

As my form fields are coming from API, I can’t hard code the field names & validation rules in my Form class. I am unable to find a way to handle dynamic fields using Yii’s CFormModel.

I think there should be a very easy way to handle such kind of problem.

Any help will be highly appreciated.

Thanks in advance.