How to show custom attributes on add app page for each product on dev portal? PFA

Not applicable
3 REPLIES 3

Not applicable

@Deepak Newase: In a custom module, you can implement hook_form_FORM_ID_alter() for the form_id of devconnect_developer_apps_edit_form. You will want to make changes to the $form['api_products']['options'] array. In your custom code, you will want to do this:

$api_products = entity_load('api_product');

and use the results to rewrite the contents of your options. Each ApiProductEntity object has an $attributes member which is an associative array of defined custom attributes. I like to enable the devel module and use kpr() and/or dsm() liberally in my code until I figure out how to access the properties I need. (Just don't forget to remove these debugging aids!)

I'm looking to do something similar. I want to add an attribute that points to the API model using an auto complete widget. Then I would then like to filter products by the associated API. We will potentially have a huge amount of Products and don't want the app developer to have to sift through Products list if they know which API they want to register for.

Not sure if anyone has attempted this or something similar. Any input would be appreciated.

I think this is a unique question and is worthy of some discussion.

Dave, can you ask it as a new question please?

4366-ask-a-question-click-here.png

It probably makes sense to reference THIS old question in yours. But yours is a new question. I have some ideas on it, and I know others do, too.