Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Hi, I'm trying to load the profile edit page via ajax so that there is no need for a page reload.
I thought it would have been as simple as:
global $user;
$type = 'profile';
$node = content_profile_load($type, $user->uid);
if (!$node) {
$node = array('uid' => $user->uid, 'name' => (isset($user->name) ? $user->name : ''), 'type' => $type, 'language' => '');
}
$form = drupal_get_form($type .'_node_form', $node);
drupal_json(array('status' => 0, 'data' => $form));
But this just returns a blank form.
Does anyone know how I would implement this?
Thanks