How to change external_form action?
Permalink
Hello,
I'm stuck with this problem for the past week and can't start designing the site until this search form is done.
So fay I've managed to do this:
1. I added an external_form block to a right side bar through the panel
2. I've copied the external_form folder from the concrete folder to my root
3. I've changed the test_form.php and test_form.php controller to create a custom input field and submit the form
4. Looking at the search block form html source, I saw the form action is "index.php/search/search-results", so I've changed the test_form action to that
5. I also saw that the search block form uses a 'query' variable name for the search form query, so I named my input field name="query"
6. and now my test_form works and looks exactly the same as the search block form
So far so good.
Now my problem is: I need to search the site based on more then one form input field. How can I do that?
I've searched everywhere and can't find the search block form source anywhere so that I can override it.
Does the search support a keyword array instead of a single variable? What should the form action be? Is "index.php/search/search-results" correct?
Please, please, please help. Thank you.
I'm stuck with this problem for the past week and can't start designing the site until this search form is done.
So fay I've managed to do this:
1. I added an external_form block to a right side bar through the panel
2. I've copied the external_form folder from the concrete folder to my root
3. I've changed the test_form.php and test_form.php controller to create a custom input field and submit the form
4. Looking at the search block form html source, I saw the form action is "index.php/search/search-results", so I've changed the test_form action to that
5. I also saw that the search block form uses a 'query' variable name for the search form query, so I named my input field name="query"
6. and now my test_form works and looks exactly the same as the search block form
So far so good.
Now my problem is: I need to search the site based on more then one form input field. How can I do that?
I've searched everywhere and can't find the search block form source anywhere so that I can override it.
Does the search support a keyword array instead of a single variable? What should the form action be? Is "index.php/search/search-results" correct?
Please, please, please help. Thank you.
you will need to make a custom search block in order to do that, also, don't put Please Help in the title.
and that's exactly what I've done - I've made a custom search block. My question was what php code I should use for form action and how to search with a keyword array instead of a single 'query' variable.
And where's the existing search block search form code so that I can override it?
And where's the existing search block search form code so that I can override it?