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

Autocomplete problem

I tried to make an autocompleted text field following this tutorial.

I did the following:

In my form:
$items['juego'] = array('#type' => 'textfield', '#title'=>t('Game').$req,'#autocomplete_path' => 'juego/autocomplete/','#size'=>'20','#maxlength'=>'100'/*,"#required"=>True*/,'#default_value' =>variable_get('juego', ""),'#description' => t('Name of the game to compete in'));

In the menu hook:

$items[] = array('path' => 'juego/autocomplete', 'title' => t('game autocomplete'),
      'callback' => 'juego_autocomplete', 'access' => user_access('access content'), 'type' => MENU_CALLBACK);

...And the handler function:

function juego_autocomplete($string) {
  $matches = array();
  $result = db_query_range("SELECT nombre FROM t_juegos WHERE LOWER(nombre) LIKE LOWER('%s%%')", $string, 0, 10);
  while ($juego = db_fetch_object($result)) {
    $matches[$juego->nombre] = check_plain($juego->nombre);
  }
  print drupal_to_js($matches);
  exit();
}

The problem is that when I type something into the text field, the handler is called but no string is passed to it, so the autocomplete returns all the possible options and not just the ones that match what I've typed.

Youtube's new player : how to remove related videos appearing on embeds ?

Hi,

YouTube a released a new player which allows users to display other videos than the one originaly embedded.

In a post on YouTube's blog, they suggest to "attach a rel=0 parameter to the video. i.e. http://www.youtube.com/v/&rel=0" but it makes the video module quite angry.

I Need to develop a customized form

Hi I Need to develop a customized form.This form contains some text fields and radio buttons.Also i need to execute this form when i click on a link developed by the l()function or when click on link developed by menu() hook.

Who are using Advertisement, Could you show it on your website?

I downloaded the module before, but I am confuse if that's correct to show, I upload image and active the ads, but image havn't been displayed on page, that just show ad name, post time and post status like:

This advertisement is actively being displayed.

This advertisement has been active since .........

I don't like this, Can we remove post name, time..... only leave image or flash on my index page

Can anybody help me about this, I will appreciate that, really need your help, I have been stoped to develop my site due to this module

Need help in creating a form

First off, I've been asked to create a leave application form on Drupal platform for my company. I've tried the Survey and Forms modules to achieve my task but couldn't. I know how to create simple form using PHP. However, in order to get it working with Drupal. I really don't know where to start.

OG Content Time Useless?

when I make a read only OG group where no content type is allowed then all I have to do is to subscribe a different group which then in turn allows me to pick that audience from the 1st group and the posting occures?!

Pages

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