|
@@ 741-743 (lines=3) @@
|
| 738 |
|
static function select( $question = FALSE, $answer = NULL, $options = FALSE, $name = FALSE, $id = '', $class = '', $required = FALSE, $required_text = '', $label_class = '', $disabled = FALSE, $system_ID = FALSE, $use_html_entities = TRUE, $add_please_select_option = FALSE ) { |
| 739 |
|
|
| 740 |
|
// need these |
| 741 |
|
if ( ! $question || ! $name || ! $options || empty( $options ) || ! is_array( $options )) { |
| 742 |
|
return NULL; |
| 743 |
|
} |
| 744 |
|
// prep the answer |
| 745 |
|
$answer = is_array( $answer ) ? self::prep_answer( array_shift( $answer )) : self::prep_answer( $answer, $use_html_entities ); |
| 746 |
|
// prep the required array |
|
@@ 845-847 (lines=3) @@
|
| 842 |
|
*/ |
| 843 |
|
static function radio( $question = FALSE, $answer = NULL, $options = FALSE, $name = FALSE, $id = '', $class = '', $required = FALSE, $required_text = '', $label_class = '', $disabled = FALSE, $system_ID = FALSE, $use_html_entities = TRUE, $label_b4 = FALSE, $use_desc_4_label = FALSE ) { |
| 844 |
|
// need these |
| 845 |
|
if ( ! $question || ! $name || ! $options || empty( $options ) || ! is_array( $options )) { |
| 846 |
|
return NULL; |
| 847 |
|
} |
| 848 |
|
// prep the answer |
| 849 |
|
$answer = is_array( $answer ) ? '' : self::prep_answer( $answer, $use_html_entities ); |
| 850 |
|
// prep the required array |
|
@@ 917-919 (lines=3) @@
|
| 914 |
|
*/ |
| 915 |
|
static function checkbox( $question = FALSE, $answer = NULL, $options = FALSE, $name = FALSE, $id = '', $class = '', $required = FALSE, $required_text = '', $label_class = '', $disabled = FALSE, $label_b4 = FALSE, $system_ID = FALSE, $use_html_entities = TRUE ) { |
| 916 |
|
// need these |
| 917 |
|
if ( ! $question || ! $name || ! $options || empty( $options ) || ! is_array( $options )) { |
| 918 |
|
return NULL; |
| 919 |
|
} |
| 920 |
|
$answer = maybe_unserialize( $answer ); |
| 921 |
|
|
| 922 |
|
// prep the answer(s) |