Hello,
I'm just starting to convert some CF5 forms to CF6. My application has a number of calls to an external DB through an API - for these calls I use Custom Code actions and CURL. Often I want to populate a dropdown with the Label/Value pairs retrieved in this way.
In CF5, it is easy - the fields are retrieved through the API in Custom Code, placed in an array, and the Dropdown uses the array as the Model and the Label and Value fields are entered.
How do I do this in CF6? I can see that it is easy enough if the read_data action is taken on a mySQL database (internal or external) because it places the retreived data in a {var:read_data} but I don't see how a Custom Code action can do it.
Cheers
Tim
I'm just starting to convert some CF5 forms to CF6. My application has a number of calls to an external DB through an API - for these calls I use Custom Code actions and CURL. Often I want to populate a dropdown with the Label/Value pairs retrieved in this way.
In CF5, it is easy - the fields are retrieved through the API in Custom Code, placed in an array, and the Dropdown uses the array as the Model and the Label and Value fields are entered.
How do I do this in CF6? I can see that it is easy enough if the read_data action is taken on a mySQL database (internal or external) because it places the retreived data in a {var:read_data} but I don't see how a Custom Code action can do it.
Cheers
Tim