HAWHAW

PHP

Class HAW_radio

HAW_radio

public class HAW_radio

This class provides a radio button element in a HAW_form object.

Examples:

$myRadio = new HAW_radio("country");
$myRadio->add_button("Finland", "F");
$myRadio->add_button("Germany", "G", HAW_CHECKED);
$myRadio->add_button("Sweden", "S");

See Also:
HAW_form

Constructor Summary
HAW_radio(var $name)
          Constructor
 
Method Summary
 void add_button(var $label, var $value, var $is_checked)
          Adds one radio button to a HAW_radio object.
 void set_voice_help(var $text, var $audio_src, var $url)
          Sets help text for voice browsers.
 void set_voice_noinput(var $text, var $audio_src, var $url)
          Sets noinput text for voice browsers.
 void set_voice_nomatch(var $text, var $audio_src, var $url)
          Sets nomatch text for voice browsers.
 void set_voice_text(var $text, var $audio_src)
          Sets text to be spoken by voice browsers.
 

Constructor Detail

HAW_radio

public HAW_radio(var $name)
Constructor
Parameters:
name - Variable in which the information about the pressed button is sent to the destination URL.
Method Detail

add_button

public void add_button(var $label,
                       var $value,
                       var $is_checked)
Adds one radio button to a HAW_radio object.
Parameters:
label - Describes the radiobutton on the surfer's screen/display.
value - Value (string!) sent in the "name" variable, if this button is selected.
is_checked - (optional)
Allowed values are HAW_CHECKED or HAW_NOTCHECKED (default).
Note: Setting to "checked" will overwrite previous "checked" radiobuttons of this HAW_radio object.

set_voice_text

public void set_voice_text(var $text,
                           var $audio_src)
Sets text to be spoken by voice browsers.
Parameters:
text - Some alternative text that replaces the enumeration of buttons.
audio_src - Some audio file (e.g. *.wav file) to play (optional).

set_voice_help

public void set_voice_help(var $text,
                           var $audio_src,
                           var $url)
Sets help text for voice browsers.
Parameters:
text - Some helpful information concerning this radio button element.
audio_src - Some audio file (e.g. *.wav file) to play (optional).
url - Some other voice deck to go to (optional).

set_voice_noinput

public void set_voice_noinput(var $text,
                              var $audio_src,
                              var $url)
Sets noinput text for voice browsers.
Parameters:
text - Some text to inform the user that no input has been received.
audio_src - Some audio file (e.g. *.wav file) to play (optional).
url - Some other voice deck to go to (optional).

set_voice_nomatch

public void set_voice_nomatch(var $text,
                              var $audio_src,
                              var $url)
Sets nomatch text for voice browsers.
Parameters:
text - Some text to complain that user input was not recognized.
audio_src - Some audio file (e.g. *.wav file) to play (optional).
url - Some other voice deck to go to (optional).

© Norbert Huffschmid
assembled from PHP source
using sed and javadoc