HAWHAW

PHP

Class HAW_checkbox

HAW_checkbox

public class HAW_checkbox

This class provides a single checkbox element in a HAW_form object.

Examples:

$myCheckbox = new HAW_checkbox("agmt", "yes", "I agree");
$myCheckbox = new HAW_checkbox("agmt", "yes", "I agree", HAW_NOTCHECKED);
$myCheckbox = new HAW_checkbox("agmt", "yes", "I agree", HAW_CHECKED);

Note: The first and the second example are identical.

See Also:
HAW_form

Constructor Summary
HAW_checkbox(var $name, var $value, var $label, var $state)
          Constructor
 
Method Summary
 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_checkbox

public HAW_checkbox(var $name,
                    var $value,
                    var $label,
                    var $state)
Constructor
Parameters:
name - Variable in which "value" is sent to the destination URL, in case that the box is checked.
value - See name.
label - Describes the checkbox on the surfer's screen/display.
state - (optional)
Allowed values are HAW_CHECKED or HAW_NOTCHECKED (default).
Method Detail

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 <label>.
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 checkbox.
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 (typically "yes" or "no") 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