This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Saving form_alter values

Hi,

I am using form_alter to change the display of some elements, and I'm having some issues saving the data to the database.

My question is: From within the s_user_save function which I have printed below, how do I access the values as saved within the profile_age1 (and profile_age2 and others) element within the form?

I have print_r'ed $user and $edit, and they do not contain the values I have entered, either containing blank values ($edit) or the current databased values ($user (not the global one)).

form_alter contains:

unset($form['section 2']['profile_age1']['#title']);
$form['section 2']['profile_age1']['#id'] = "edit-profile_age1";
$form['section 2']['profile_age1']['#name'] = "edit[profile_age1]";
$form['section 2']['profile_age1']['#parents'] = array('profile_age1');
$form['section 2']['profile_age1']['#value'] = $user->profile_age1;

$a1 = form_render($form['section 2']['profile_age1']);
$form['section 2']['age'] = array('#type'=>'markup', '#value' => $a1);

and, hook_user contains:

  switch ($type) {
    case 'update':
    case 'insert':
        s_user_save($edit, $user, $category);
        break;

Form item tekst question

I am working on a form module, every thing is working fine.
But i cant find the form type to simply display tekst.

On my webform i want user info displayed but not for editing like user name and other profile info.
I also need title between input fields.

Is there a simpel form item that does nothing but display a tekst?

How to insert comment user name to a article

require: want to insert comment user for a prerelease article. who comment for this article, who will be show in this article.
the article include story, page, event, forume etc.

who can help me write php snippets, I want to inserted prerelease article.

Q: Query data from Flexinode?

I am trying to display data from my flexinode and am having trouble trying to figure out just how to query it.

What I would like to do is display nodes like how they show up when listed in taxonomy, but I would also like to be able to use variables like $node->flexinode_3. I basically want to be able to list certain elements from my flexinode in a loop anywhere on my site.

Any help is always appreciated.

Thanks :).

Gallery Remote & digiKam - sub-galleries don't show up

I am using the Gallery Remote module available at http://lsb.blogdns.net/software/galleryremote/, which is a really nice way to upload lots of photos to my Drupal site.

I have set up a number of image galleries, each of which has several sub-galleries. However, when using digiKam, only the 1st level galleries are accessible through the digiKam gallery remote client. The result is that I can upload the pictures to my "Photos" gallery, but not to my "Photos -- 2006" gallery.

Need block for users to submit their email address & it generates an email.

I have been banging my head trying to find a simple way that users, not just registered users, can submit their email address and this "submit" action will generate an email to them AND to the admin, or even better, create an email list.

I don't need/want any other options, just a block on my main page that users put their email address into and viola - they get an email in return. Can anybody point me in the right direction? I'm php illiterate, and my attempts at using flash within drupal have failed.

Anyone pity me?

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions