|
|
|
|
@ -31,11 +31,23 @@ class val_tests_in { |
|
|
|
|
return $required_post_string_field; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private static function define_pets_radio(string $desc, string $kind_of_pet) { |
|
|
|
|
$radio = new IO(); |
|
|
|
|
$radio->input_type = E\INPUTS::post; |
|
|
|
|
$radio->form_type = FORM_TYPE::radio; |
|
|
|
|
$radio->field_description = $desc; |
|
|
|
|
$radio->form_check_or_radio_name = "pets"; |
|
|
|
|
$radio->form_check_or_radio_value = $kind_of_pet; |
|
|
|
|
$radio->form_control_class = "radio"; |
|
|
|
|
$radio->skip_output = true; |
|
|
|
|
return $radio; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static function entry(object $app): array { |
|
|
|
|
$html['name'] = self::define_io("Full Name"); |
|
|
|
|
|
|
|
|
|
$html['personality'] = self::define_io("Personality Type", ""); |
|
|
|
|
$html['personality']->form_data_list = ["cool"=>"Cool", "smart"=>"Smart", "fun"=>"Fun"]; |
|
|
|
|
$html['personality'] = self::define_io("Personality Type", "required"); |
|
|
|
|
$html['personality']->form_data_list = ["none"=>"Pick", "cool"=>"Cool", "smart"=>"Smart", "fun"=>"Fun"]; |
|
|
|
|
$html['personality']->form_type = FORM_TYPE::select; |
|
|
|
|
$html['personality']->form_control_class = "select"; |
|
|
|
|
|
|
|
|
|
@ -56,20 +68,9 @@ class val_tests_in { |
|
|
|
|
$html['agree']->form_control_class = "checkbox"; |
|
|
|
|
$html['agree']->skip_output = true; |
|
|
|
|
|
|
|
|
|
$html['dogs'] = self::define_io("I like dogs", ""); |
|
|
|
|
$html['dogs']->form_type = FORM_TYPE::radio; |
|
|
|
|
$html['dogs']->form_check_or_radio_name = "pets"; |
|
|
|
|
$html['dogs']->form_check_or_radio_value = "Dog"; |
|
|
|
|
$html['dogs']->form_control_class = "radio"; |
|
|
|
|
$html['dogs']->skip_output = true; |
|
|
|
|
|
|
|
|
|
$html['cats'] = self::define_io("I like cats", ""); |
|
|
|
|
$html['cats']->form_type = FORM_TYPE::radio; |
|
|
|
|
$html['cats']->form_check_or_radio_name = "pets"; |
|
|
|
|
$html['cats']->form_check_or_radio_value = "Cat"; |
|
|
|
|
$html['cats']->form_control_class = "radio"; |
|
|
|
|
$html['cats']->skip_output = true; |
|
|
|
|
|
|
|
|
|
$html['dogs'] = self::define_pets_radio("I like dogs", "Dog"); |
|
|
|
|
$html['cats'] = self::define_pets_radio("I like cats", "Cats"); |
|
|
|
|
$html['fish'] = self::define_pets_radio("I'm into fish", "Fish"); |
|
|
|
|
|
|
|
|
|
return [ |
|
|
|
|
'method' => $app->request->get_method(), |
|
|
|
|
|