@@ 752-754 (lines=3) @@ | ||
749 | 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 ) { |
|
750 | ||
751 | // need these |
|
752 | if ( ! $question || ! $name || ! $options || empty( $options ) || ! is_array( $options )) { |
|
753 | return NULL; |
|
754 | } |
|
755 | // prep the answer |
|
756 | $answer = is_array( $answer ) ? self::prep_answer( array_shift( $answer ), $use_html_entities) : self::prep_answer( $answer, $use_html_entities ); |
|
757 | // prep the required array |
|
@@ 858-860 (lines=3) @@ | ||
855 | */ |
|
856 | 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 ) { |
|
857 | // need these |
|
858 | if ( ! $question || ! $name || ! $options || empty( $options ) || ! is_array( $options )) { |
|
859 | return NULL; |
|
860 | } |
|
861 | // prep the answer |
|
862 | $answer = is_array( $answer ) ? '' : self::prep_answer( $answer, $use_html_entities ); |
|
863 | // prep the required array |
|
@@ 930-932 (lines=3) @@ | ||
927 | */ |
|
928 | 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 ) { |
|
929 | // need these |
|
930 | if ( ! $question || ! $name || ! $options || empty( $options ) || ! is_array( $options )) { |
|
931 | return NULL; |
|
932 | } |
|
933 | $answer = maybe_unserialize( $answer ); |
|
934 | ||
935 | // prep the answer(s) |