My form in php doesn't work

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
imlegend
Forum Members
Forum Members
Posts: 11
Joined: Wed Jun 19, 2013 12:56 pm

My form in php doesn't work

Post 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.
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1974
Joined: Mon Jan 29, 2007 4:47 pm

Re: My form in php doesn't work

Post 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...
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
imlegend
Forum Members
Forum Members
Posts: 11
Joined: Wed Jun 19, 2013 12:56 pm

Re: My form in php doesn't work

Post 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 :)
HarmO
Power Poster
Power Poster
Posts: 251
Joined: Thu Jan 26, 2012 3:22 pm

Re: My form in php doesn't work

Post 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.
Kind regards,
HarmO
Post Reply

Return to “The Lounge”