A customer of mine has printed references of the entry Ids of their product. Now they want to have a search form on their website where it's possible to search either by the name or by entry Ids.

How can you search for an entry id and other fields at the same time in a search form?

1 Answer 1


This currently isn't possible with Craft's native search solution.

Element IDs aren't indexed in the craft_searchindex table in the database.

As a workaround you could maybe use the Preparse plugin to copy the entry ID into a custom field called "entryId" so you could search via entryId:####.

  • are there other solutions you know of?
    – outline4
    Sep 1, 2017 at 21:55
  • Updated answer.
    – Brad Bell
    Sep 1, 2017 at 21:57
  • I thought of giving it a try with the preparse field and save the Id to a field. That should work, not?
    – outline4
    Sep 1, 2017 at 21:58
  • ha ha, we were posting the same idea at the same time :) thanks! I'll try that!
    – outline4
    Sep 1, 2017 at 21:58

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.