{ Community }
  • Academy
  • Docs
  • Developers
  • Resources
    • Community Articles
    • Apigee on GitHub
    • Code Samples
    • Videos & eBooks
    • Accelerator Methodology
  • Support
  • Ask a Question
  • Spaces
    • Product Announcements
    • General
    • Edge/API Management
    • Developer Portal (Drupal-based)
    • Developer Portal (Integrated)
    • API Design
    • APIM on Istio
    • Extensions
    • Business of APIs
    • Academy/Certification
    • Analytics
    • Events
    • Hybrid
    • Integration (AWS, PCF, Etc.)
    • Microgateway
    • Monetization
    • Private Cloud Deployment
    • Insights
    • IoT Apigee Link
    • BaaS/Usergrid
    • BaaS Transition/Migration
    • Apigee-127
    • New Customers
    • Topics
    • Questions
    • Articles
    • Ideas
    • Leaderboard
    • Badges
  • Log in
  • Sign up

Get answers, ideas, and support from the Apigee Community

  • Home /
  • Developer Portal (Drupal-based) /
avatar image
1
Question by Dave · Apr 18, 2017 at 08:12 PM · 258 Views custom attributesappregisterdrupal hook

Set custom Dev Portal App attribute via input param

I have added custom attribute on the Dev Portal Application called API Title (aka Model Name in Management UI).

I've added a custom API Summary screen that displays a Swagger UI, the product associated with the model, a downloadable swagger and a Register Now Button that will redirect to the Register App page and append the model name as a parameter. (ie. https://domain.com/user/me/apps-to-api-direct/add/Docusign_1?)

What I would like to do is take the appended API Model (Docusign_1) in the URL and set it in the Dev Portal Application attribute API Title. Very similar to a contextual filter in drupal views. I know this will take some custom work within the Devconnect Modules, but I need some assistance in determining where to set those custom attributes in the Dev Portal App.

Any assistance would be GREATLY appreciated.

register-with-api.png (116.9 kB)
add-app.png (58.5 kB)
Comment
Add comment
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Close

1 Answer

  • Sort: 
avatar image
1
Best Answer

Answer by Anil Sagar @ Google   · Apr 18, 2017 at 10:04 PM

@Dave ,

It should be simple, Just do form alter in a custom module of above form, Read the param using below code,

$api_title = arg(4);

Set the attribute default value by altering the form using hook_form_form_id_alter,

function YOURMODULE_form_FORMID_alter(&$form, &$form_state, $form_id) {
	
}

For example,

function YOURMODULE_form_alter(&$form, &$form_state, $form_id) {
    if ($form_id == 'devconnect_developer_apps_edit_form') {
        $form['attribute_API%20Title']['#default_value'] = arg(3);
    }
}

Hope it helps, Keep us posted if any.


screen-shot-2017-04-18-at-30344-pm.png (93.7 kB)
Comment
Add comment Show 1 · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Anil Sagar @ Google ♦♦   · May 02, 2017 at 12:46 PM 0
Link

@Dave , If your query is resolved, Please click on accept link below the answer so that it's helpful for others. If not, Keep us posted.

Follow this Question

Answers Answers and Comments

48 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Automatically create an app for a new user after registration 2 Answers

How to show API Models on add app page on dev portal? 1 Answer

How do you show / hide API Products on the App Registration page based on the logged in user / roles? 1 Answer

Apigee Developer Portal , Blog Widget Customization 2 Answers

I need to remove the Register and Request new password tab from the login form page. 2 Answers

  • Products
    • Edge - APIs
    • Insights - Big Data
    • Plans
  • Developers
    • Overview
    • Documentation
  • Resources
    • Overview
    • Blog
    • Apigee Institute
    • Academy
    • Documentation
  • Company
    • Overview
    • Press
    • Customers
    • Partners
    • Team
    • Events
    • Careers
    • Contact Us
  • Support
    • Support Overview
    • Documentation
    • Status
    • Edge Support Portal
    • Privacy Policy
    • Terms & Conditions
© 2019 Apigee Corp. All rights reserved. - Apigee Community Terms of Use - Powered by AnswerHub
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Post an idea
  • Spaces
  • Product Announcements
  • General
  • Edge/API Management
  • Developer Portal (Drupal-based)
  • Developer Portal (Integrated)
  • API Design
  • APIM on Istio
  • Extensions
  • Business of APIs
  • Academy/Certification
  • Analytics
  • Events
  • Hybrid
  • Integration (AWS, PCF, Etc.)
  • Microgateway
  • Monetization
  • Private Cloud Deployment
  • Insights
  • IoT Apigee Link
  • BaaS/Usergrid
  • BaaS Transition/Migration
  • Apigee-127
  • New Customers
  • Explore
  • Topics
  • Questions
  • Articles
  • Ideas
  • Members
  • Badges