0

I am trying to create a custom search page with two input fields.

Company Name and Certification Code are two fields to be entered by user.

I have a content type called certification and the search will be performed based on this Content type.

A field collection is used to enter certifications details(Certificate Name ,Certificate Number ,Certificate ,Issuing Date: ,Date of Expiry).

The result page will separated one or under the same page of search form.

I tried many ways and i am not convinced with the results. I created a page node--certification.tpl to show the result

Here i want two things :

  1. In the search page Two input fields to be entered ,the combination of two items in content type(company name,Certificate number.) Here certificate number is a field collection value.I couldn't search from the field collection.I used custom search module.

  2. Show the result in this page directly when we search from the search page instead of showing the intermediate result page.

Search Page enter image description here

Search Result looks like Search Result looks like

I hope someone will help me to get a perfect search page.

  • What is the actual problem/question? Is this a presentation issue? Or a functionality one? You should update your question accordingly, will help you get a better answer from the community. Cheers! – Stefanos Petrakis Mar 23 '16 at 15:42
  • yes i updated the answer – Hari kris Mar 23 '16 at 16:30
1

Installing module or modifying .tpl files are not required to get a simple search page.

Creating a view and using Exposed Filters setting will get the job done.

Providing you high level steps below, you may need to research a bit more to accomplish this task.

Steps

  1. Create a View.
  2. Choose "Table" in Format section.
  3. Add "Certificate Name ,Certificate Number,Certificate,Issuing Date,Date of Expiry" in field section.
  4. In filter criteria, select your content type.
  5. Also add "Company name, Certificate number" in the Filter Criteria.
  6. Click Advanced > Better Exposed Forms > Better Exposed Filters. enter image description here

  7. Expose the fields "Company name & Certification number" as text fields.

  8. You can expose this fields as a Drupal Block and assign it anywhere in the page.
  • Thanks for the valuable answer.But the certificate number is coming from the field collection "certifications details", Can we mention the field collection items separate in better exposed filter? – Hari kris Mar 26 '16 at 5:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.