Page 1 of 1
My form in php doesn't work
Posted: Thu Jan 23, 2014 5:52 pm
by imlegend
Hi,
I got such issue: my search script (in php) runs well on website without cms ms.
When I put it into cmsms website it does nothing, just displays the same page.
Script is called "rezultaty.php" and in tag of form i use exactly this.
<form action="rezultaty.php" method="GET" class = "szukanie">
<input class = "pole1" type="text" name="query" />
my question : Is it correct name of action? I think i got some bug here. I tried to change it to page alias, which is "rezultaty"
but it hasn't changed antyhing.
Re: My form in php doesn't work
Posted: Thu Jan 23, 2014 6:34 pm
by Jo Morg
imlegend wrote:I got such issue: my search script (in php) runs well on website without cms ms.
When I put it into cmsms website it does nothing, just displays the same page.
CMSMS has it's own Search module installed with the core. Why would you need an external script to do that?
Where do you
"...put it into cmsms website..."?
imlegend wrote:my question : Is it correct name of action? I think i got some bug here. I tried to change it to page alias, which is "rezultaty"
but it hasn't changed antyhing.
There are way too many ways to include an external script into CMSMS (UDT's, plugins, modules...) but there is not enough data from you, for us to be able to help. Try CMSMS own search module,
read DOCS, and if that doesn't fit the bill, give more (way more) info on what it is that you are trying to achieve...
Re: My form in php doesn't work
Posted: Thu Jan 23, 2014 7:19 pm
by imlegend
Well, im adding scripts through UDT.
(I use external scripts but maybe i ll try formbuilder if this wont work.)
But still, I m sure that sth is wrong with my action (or action URL).
I'm trying to achieve form that search my database and displays results.
sry for language mistakes, if there were any

Re: My form in php doesn't work
Posted: Tue Jan 28, 2014 2:47 pm
by HarmO
What does "rezultaty.php" do? Probably your script is not compatible with Cms Made Simple.
Instead use the build in search function of Cms Made Simple by just including the {search} tag where you want the search field to be displayed.
it also has some parameters
Parameters
(optional) lang="en_US"
(optional) inline="false"
(optional) passthru_*="null"
(optional) modules="null"
(optional) resultpage="null"
(optional) searchtext="null"
(optional) detailpage="null"
(optional) submit="Submit"
(optional) action="default"
(optional) pageid="null"
(optional) count="null"
(optional) search_method="get"
Pretty Urls Compatibility via Method POST, default value is always GET, to make this work just put {search search_method="post"}
search and result templates can be easily modified throu its admin interface in "Extensions > Search".
Trying something with formbuilder will not get you there either.