Forum
Custom search forms
Hi there, I need a search page in Indonesian as well as English. My English search is just the usual setup and is working perfectly, but my Indonesian page is still showing the English form.
- English search page: search.php
- Indonesian search page: /bahasa/search.php
- search-form-bahasa.html is in the perch/templates/search folder, and is a copy of search-form.html with the label and button values translated to Indonesian.
- No shared or editable regions in either page.
English search.php has
<?php perch_search_form(); ?>
and Indonesian /bahasa/search.php has
<?php perch_search_form('search-form-bahasa.html'); ?>
Looking at https://docs.grabaperch.com/docs/search/page-functions/perch-search-form/ I thought I could just add the file name as an argument and it would find it in the search folder. But does it need a full file path? Or am I doing something wrong?
Have you tried to add the template as an option in an array. Something like this, for example,
I'll give that a go, thanks Scott!