help; add #attributes to $form['actions']['submit'] user.module

hello people, i was try add some css submit button to user_login_block
I guess it should work well, but not show the form.

  $form['actions']['submit'] = array('#type' => 'submit',
    '#value' => t('Log in'),
    '#attributes' => array('class' => 'btn'),
  );

Based on this information.

forms_api_reference

Comment fields do not render for one content type regardless of theme

[this got rather long, so I bolded the relevant parts for quick scanning]

I have about five content types and all have a the main comment stored in the comment_body field.

All behave as expected except for one content type where the comment body does not show. The title, excerpted from the body shows, but the data does not. If I add a new field, nothing at all from that field shows, regardless of whether it comes first or second in the Comment Fields listing.

I've tried this in Bartik, Stark and Seven and the theme makes no difference.

When I look at the devel /render output, it shows that in other content types there's an array element for (where 2070 is the comment number):

$array['comments']['comments']['2070']['comment_body'] and that element contains 16 elements.

In the content type that has problems, this is entirely missing. So somehow it is not getting rendered at all.

When I look in the DB, the data is there. When I edit the comment, the data is there. But when I preview or look at the comment on the page, all I get is the title.

I've tried everything I can think of... but I just can't figure this out.

  • compared all the settings to those of content types where it works.

Just about ready to give up.

So, the search only finds user names and nothing else; the mediafront player does nothing even though I gave it an XML file to load; the wysiwyg I tried to install doesn't work; can't figure out how to add a tab or two to the user profiles.

Otherwise, the site sure is pretty! But absolutely useless without these things working. If I could afford to hire someone to get this running, I would. As it is, we're barely holding onto the house.

Is there anyone out there who can lend a hand?

Form id attribute changing to myform--2

I have a form module with two block views. Both use the same form fields and I would like to use the same javascript. So i need all the ids to be the same no matter what.

But, Drupal is changing form element id attributes, adding two dashes and a number like 'myform--2' instead of just 'myform'. Is there a way to ensure that all forms (and elements) will have the same id attributes for any blocks I add to my module?

Below is the block info and block view code.

where to store extra user information?

Hi,
I am making a module which amongst other things add some information to each user account. Which is the most correct way to store such information? Should I use a db-schema and db_insert? Or should I extend the profile with extra fields? And in that case, how can I do that?

No option to install new themes under Admin -> Appearance

My option to install a new theme is gone. Any ideas?

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x