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

How to theme a form created by hook_form

Hi,
I have written a new module 'album' and have written a function 'album_form' to implement hook_form. I want to theme the form created here and do not want to create a new theme file. can any one help?

Blogs and forums integration

Hi to All,

Many web sites work in the way that user comments on articles or blog entries appear also on forum.

I would like to do it in similar way: the simplest way I see is that forum shows not only forum topics but also blog entries. This way all comments from forum users will be shown also on blogs - and vice versa.

I am surprised I cannot find such solution in Drupal 6 as it seems to be quite common problem. I searched forums many times and see that such questions appear from time to time, for example:

form API: onchange attribute: Getting value from JavaScript function?

Hi

Question:

  1. How do I grab the selected value from Javascript post onchange?
  2. What approach must I do to implement change to my page post onchange and I have the selected value?

I have defined a content that has two pull-down menus, form attribute '#type' => 'select', to two forms A and B on the same page.

How B's form #options is populated is dependent upon what option is selected within A's form #options. Thereby, initially set B's form #disabled => TRUE until A's form onchange has a new value.

I have provided A's form onchange attribute with a javascript function:

    $form['A'] = array(
      '#type'           => 'select',
      '#title'          => t('A'),
      /* more stuff here... */
      '#attributes' => array('onchange' => 'A_onlick(this.selectedIndex)'),
   );

javascript code:

function A_onlick(value_A_id) {
	alert("A:" + value_A_id);
	// Not sure what goes here...
	};

Drupal php code:

  $A_id_selected = // Not sure what goes here...

And post onclick, do I need to implement hook_form_alter() so that the second B's pull-down receives the Javascript value and thereby B's form #options can be populated?

Module to Organise Meetings

Hey Guys,

I'm currently running a website for my college's student union. The college's senior tutor is interested in arranging start of term Director of Studies meetings online. This would basically involve listing 10 minute slots for each tutor when they are available and having a student in their tutor group chose one of the slots. Obviously that slot should then become unavailable for anyone else and students shouldn't be able to select time slots from another tutor. It would be nice if the student could also release that slot and chose another.

Role and profile

Folowing I want to implement:

User visits page -> user choose role -> user fills out specific profil -> user is happy

What is the best way to do this?

Slideshow Creator - not working

We're creating a varable:

$slideshow = "[slideshow:2, rotate=2, blend=1, layout=default, name=Banner, height=300, width=250, img=|http://localhost/riazu/sites/default/files/Sunset_108.jpg|http://localhost/riazu/sites/default/files/Sunset_108.jpg|Test image|The complete and utter driving experience|Smart|]" ;

And then trying to print it this way:

Pages

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