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

hook_form annoyance...

I'm trying to develop a "page". On this page the user will see a task title, drop down menu, and task description text area.
So, at the moment I am using the hook_form.
However, at the top when I try to fill in my form I see "author information", "Options (published, in moderation queue, on front of page etc...)" and "user comments (disabled, read only etc.)
Also, it displays a "preview" button, when a task will not require a preview.

Multiple form functions

Im building my first form module on drupal 4.7

The user form is working fine. Now i want to create a admin form.

- User form is for logged user, to send feedback to admin
- Admin form is for settings.

I have two function to build forms.
function user_page(){

}

function admin_page(){

}

How can i link the two submit buttons of each form to a diffrend function?

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 :).

Pages

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