public function view() { $fields_template_relative_path = "/view_form_fields/{$this->form_key}.php"; $fields_template_absolute_path = dirname(__FILE__) . $fields_template_relative_path; if (!file_exists($fields_template_absolute_path)) { throw new Exception(t('Custom Contact Form Error: Missing form fields template file %s', $fields_template_absolute_path)); } $this->set('fields_template', $fields_template_relative_path); $has_files = CustomContactForm::hasFileFields($this->form_key); $this->set('has_files', $has_files); $this->set('show_thanks', !empty($_GET['thanks']) && $_GET['thanks'] == $this->bID); $this->set('honeypot_blank_field_name', CustomContactForm::$honeypot_blank_field_name); $this->set('honeypot_blank_field_label', CustomContactForm::$honeypot_blank_field_label); $this->set('honeypot_retained_field_name', CustomContactForm::$honeypot_retained_field_name); $this->set('honeypot_retained_field_value', CustomContactForm::$honeypot_retained_field_value); }
public function view() { $fields_template_relative_path = "/view_form_fields/{$this->form_key}.php"; $fields_template_absolute_path = dirname(__FILE__) . $fields_template_relative_path; if (!file_exists($fields_template_absolute_path)) { throw new Exception(t('Custom Contact Form Error: Missing form fields template file %s', $fields_template_absolute_path)); } $this->set('fields_template', $fields_template_relative_path); $has_files = CustomContactForm::hasFileFields($this->form_key); $this->set('has_files', $has_files); $this->set('show_thanks', !empty($_GET['thanks']) && $_GET['thanks'] == $this->bID); $this->set('honeypot_blank_field_name', CustomContactForm::$honeypot_blank_field_name); $this->set('honeypot_blank_field_label', CustomContactForm::$honeypot_blank_field_label); $this->set('honeypot_retained_field_name', CustomContactForm::$honeypot_retained_field_name); $this->set('honeypot_retained_field_value', CustomContactForm::$honeypot_retained_field_value); // get the product pages children pID 130 $pl = new PageList(); $pl->filterByParentID('130'); $pl->sortByDisplayOrder(); $productpages = $pl->get(); $this->set('productpages', $productpages); // Bi fold doors // get the Aluminium - bi fold pages pID 154 $pl = new PageList(); $pl->filterByParentID('154'); $pl->sortByDisplayOrder(); $aluminium_productpages = $pl->get(); $this->set('aluminium_productpages', $aluminium_productpages); // get page name $p = Page::getByID(154); $p_name = $p->getCollectionName(); $this->set('aluminium_productpage_name', $p_name); // get the Timber - bi fold pages pID 155 $pl = new PageList(); $pl->filterByParentID('155'); $pl->sortByDisplayOrder(); $timber_productpages = $pl->get(); $this->set('timber_productpages', $timber_productpages); // get page name $p = Page::getByID(155); $p_name = $p->getCollectionName(); $this->set('timber_productpage_name', $p_name); // get the Composite - bi fold pages pID 156 $pl = new PageList(); $pl->filterByParentID('156'); $pl->sortByDisplayOrder(); $composite_productpages = $pl->get(); $this->set('composite_productpages', $composite_productpages); // get page name $p = Page::getByID(156); $p_name = $p->getCollectionName(); $this->set('composite_productpage_name', $p_name); // Sliding doors // get Sliding doors pages pID 132 $pl = new PageList(); $pl->filterByParentID('132'); $pl->sortByDisplayOrder(); $sliding_doors_productpages = $pl->get(); $this->set('sliding_doors_productpages', $sliding_doors_productpages); // get page name $p = Page::getByID(132); $p_name = $p->getCollectionName(); $this->set('sliding_doors_productpage_name', $p_name); // Sliding turn systems // get Sliding Sliding turn systems pages pID 133 $pl = new PageList(); $pl->filterByParentID('133'); $pl->sortByDisplayOrder(); $sliding_turn_systems_productpages = $pl->get(); $this->set('sliding_turn_systems_productpages', $sliding_turn_systems_productpages); // get page name $p = Page::getByID(133); $p_name = $p->getCollectionName(); $this->set('sliding_turn_systems_productpage_name', $p_name); // Sliding Horizontal walls // get Sliding Horizontal walls pages pID 138 $pl = new PageList(); $pl->filterByParentID('138'); $pl->sortByDisplayOrder(); $moveable_walls_productpages = $pl->get(); $this->set('moveable_walls_productpages', $moveable_walls_productpages); // get page name $p = Page::getByID(138); $p_name = $p->getCollectionName(); $this->set('moveable_walls_productpage_name', $p_name); // Windows // pID 139 //$pl = new PageList; //$pl->filterByParentID('138'); //$pl->sortByDisplayOrder(); //$moveable_walls_productpages = $pl->get(); //$this->set('moveable_walls_productpages', $moveable_walls_productpages); // get page name $p = Page::getByID(139); $p_name = $p->getCollectionName(); $this->set('windows_productpage_name', $p_name); }