Hello I have just made an tested an add on for your script for auto-complete feature with script.aculo.us. I wish only to give for some one that whant to use it
// check if the field exists and is a textfield
if( !$this->fieldExists($field) || strtolower(get_class( $this->_fields[$field][1] )) != 'textfield')
{
trigger_error(
'You have to declare the textfield first! '.
'The field "'.$field.'" does not exists in the form!',
E_USER_WARNING
);
return;
}
// check if the options are correct
if( is_array( $Link ) )
{
trigger_error( 'You have to a link to ajax handler!', E_USER_WARNING );
return;
}
// add the javascript file if not done yet
if( !$setJS )
{
$setJS = true;
$this->_setJS( FH_FHTML_DIR.'js/prototype.js', true );
$this->_setJS( FH_FHTML_DIR.'js/scriptaculous.js', true );
}
// create the javascript object to handle Ajax transfer
$js = "\n".'new Ajax.Autocompleter("'.$field.'", "'.$field.'_choices", "'.$Link.'", {paramName: "value"});'."\n";
$this->_setJS($js, false, false);
$this->_fields[$field][1]->_sExtraAfter .="\n<div id=\"".$field."_choices\" class=\"autocomplete\"></div>\n";