NAME='auto_complete_form'; $form->METHOD='POST'; $form->ACTION=''; $form->debug='error_log'; $form->AddInput(array( 'TYPE'=>'text', 'ID'=>'color', 'NAME'=>'color', 'LABEL'=>'Color', 'ACCESSKEY'=>'C', 'VALUE'=>'', 'SIZE'=>32, 'ExtraAttributes'=>array( 'autocomplete'=>'off' ) )); $form->AddInput(array( 'TYPE'=>'button', 'NAME'=>'show_colors', 'ID'=>'show_colors', 'VALUE'=>'...' )); $form->AddInput(array( 'TYPE'=>'custom', 'ID'=>'complete_color', 'NAME'=>'complete_color', 'CustomClass'=>'form_auto_complete_class', 'CompleteInput'=>'color', 'CompleteMinimumLength'=>1, 'CompleteValues'=>array( 'Black'=>' Black', 'Blue'=> 'Blue', 'Cyan'=> 'Cyan', 'Green'=> 'Green', 'Magenta'=> 'Magenta', 'Red'=> 'Red', 'White'=> 'White', 'Yellow'=> 'Yellow', ), 'Dynamic'=>1, 'ShowButton'=>'show_colors', 'FeedbackElement'=>'complete_color_feedback', 'SubmitFeedback'=>' Looking up for colors ', 'CompleteFeedback'=>' ', )); $form->AddInput(array( 'TYPE'=>'text', 'ID'=>'font', 'NAME'=>'font', 'LABEL'=>'Font', 'ACCESSKEY'=>'F', 'VALUE'=>'', 'SIZE'=>32, 'ExtraAttributes'=>array( 'autocomplete'=>'off' ) )); $form->AddInput(array( 'TYPE'=>'image', 'NAME'=>'show_fonts', 'ID'=>'show_fonts', 'SRC'=>'pulldown.gif', 'ALT'=>'Show fonts', 'ALIGN'=>'top' )); $form->AddInput(array( 'TYPE'=>'custom', 'ID'=>'complete_font', 'NAME'=>'complete_font', 'CustomClass'=>'form_auto_complete_class', 'CompleteInput'=>'font', 'CompleteMinimumLength'=>1, 'CompleteValues'=>array( 'sans-serif'=> 'ABCSans Serif', 'serif'=> 'ABCSerif', 'cursive'=> 'ABCCursive', 'fantasy'=> 'ABCFantasy', 'monospace'=> 'ABCMonospace', ), 'Dynamic'=>0, 'MenuStyle'=>'', 'MenuClass'=>'groovymenu', 'ItemStyle'=>'', 'SelectedItemStyle'=>'', 'ItemClass'=>'groovyitem', 'SelectedItemClass'=>'groovyselecteditem', 'ShowButton'=>'show_fonts', )); /* * This code is necessary to handle the requests for fetching * auto-complete values. */ $form->HandleEvent($processed); if($processed) exit; $form->ConnectFormToInput('color', 'ONLOAD', 'Focus', array()); $onload=HtmlSpecialChars($form->PageLoad()); ?> Test for Manuel Lemos' PHP form class using the auto-complete plug-in input

Test for Manuel Lemos' PHP form class using the auto-complete plug-in input


StartLayoutCapture(); $title='Auto-complete plug-in test'; $body_template='form_auto_complete_body.html.php'; include('templates/form_frame.html.php'); $form->EndLayoutCapture(); $form->DisplayOutput(); ?>