private function get_enter_plu_code_form() { $enter_plu_code_form = new HTMLTags_Form(); $enter_plu_code_form->set_attribute_str('name', 'enter_plu_code'); $enter_plu_code_form->set_attribute_str('method', 'GET'); $enter_plu_code_form->set_attribute_str('class', 'table-select-form'); $enter_plu_code_form->set_action(new HTMLTags_URL('/')); $inputs_ol = new HTMLTags_OL(); /* * Select whether you want all products or just those with status==display */ $li = new HTMLTags_LI(); $label = new HTMLTags_Label('PLU Code'); $label->set_attribute_str('for', 'plu_code'); $li->append_tag_to_content($label); $input = new HTMLTags_Input(); $input->set_attribute_str('name', 'plu_code'); $li->append($input); $inputs_ol->append($li); /* * The submit button. */ $go_button_li = new HTMLTags_LI(); $go_button = new HTMLTags_Input(); $go_button->set_attribute_str('type', 'submit'); $go_button->set_attribute_str('value', 'Go'); $go_button->set_attribute_str('class', 'submit'); $go_button_li->append_tag_to_content($go_button); $inputs_ol->add_li($go_button_li); $enter_plu_code_form->append($inputs_ol); /* * The hidden inputs. */ $current_page_url = $this->get_current_page_url(); $enter_plu_code_action = clone $current_page_url; $enter_plu_code_action_get_vars = $enter_plu_code_action->get_get_variables(); foreach (array_keys($enter_plu_code_action_get_vars) as $key) { $form_hidden_input = new HTMLTags_Input(); $form_hidden_input->set_attribute_str('type', 'hidden'); $form_hidden_input->set_attribute_str('name', $key); $form_hidden_input->set_attribute_str('value', $enter_plu_code_action_get_vars[$key]); $enter_plu_code_form->append_tag_to_content($form_hidden_input); } return $enter_plu_code_form; }