I'm trying to add profile2 fields in my custom form. I have created a path in my custom module in hook_menu() and in page arguments inside array, I have passed my custom_form.
In my custom_form I have returned the following code:
function custom_form($form, &$form_state) { global $user; module_load_include('inc', 'user', 'user.pages'); return drupal_get_form('user_profile_form', $user); } When I go to the path I do not see the fields which I had created for a particular profile type through manage fields. Instead it renders the default user-profile-form fields.
Where I'm going wrong? Please suggest any ideas.
Thanks In advance