Could anybody help me please, I have an html form in a tpl file, but in the action parameter how can I redirecto to a php file that I create and where that file must be located?
The file can be located anywhere as long as you use the full URL to point to it. However I prefer to keep all my php scripts in the 'www' folder as this is the root for mobile site server.
To prevent issues with the main Kurogo file setup I created a folder called 'custom_scripts' (but you can call it anything as long as it is not a folder name already used by Kurogo, for example you should not call it 'map' as this will interfere with the map module).
Then just store your scripts in there, the URL will begin with the root URL of your site with "/custom_scripts/[script_name]" appended. For example:
On Friday, July 27, 2012 8:42:22 AM UTC+1, Juan Carlos Garcia wrote:
> Hello everyone:
> Could anybody help me please, I have an html form in a tpl file, but in > the action parameter how can I redirecto to a php file that I create and > where that file must be located?
I prefer to keep it in a module, so for instance there is a module "helloworld". In the site/app/modules/helloworld folder place a "templates" folder and put your template "formname.tpl" there. Have it submit to something like "formname-submit". (This will resolve to "/helloworld/form-submit) Then in the "initializeForPage()" function for this helloworld module make a "switch/case 'formname-submit':". Place your logic for the form here. You'll also want to add a blank "formname-submit.tpl" file so the system doesn't bark at you.
On Friday, July 27, 2012 3:42:22 AM UTC-4, Juan Carlos Garcia wrote:
> Hello everyone:
> Could anybody help me please, I have an html form in a tpl file, but in > the action parameter how can I redirecto to a php file that I create and > where that file must be located?
On Fri, Jul 27, 2012 at 6:03 AM, Michael <earlgreydiar...@gmail.com> wrote:
> The file can be located anywhere as long as you use the full URL to point
> to it. However I prefer to keep all my php scripts in the 'www' folder as
> this is the root for mobile site server.
> To prevent issues with the main Kurogo file setup I created a folder
> called 'custom_scripts' (but you can call it anything as long as it is not
> a folder name already used by Kurogo, for example you should not call it
> 'map' as this will interfere with the map module).
> Then just store your scripts in there, the URL will begin with the root
> URL of your site with "/custom_scripts/[script_name]" appended. For example:
> Obviously replace the "server.universitas.com/mobile" with your server
> address I hope that makes sense.
> Michael
> On Friday, July 27, 2012 8:42:22 AM UTC+1, Juan Carlos Garcia wrote:
>> Hello everyone:
>> Could anybody help me please, I have an html form in a tpl file, but in
>> the action parameter how can I redirecto to a php file that I create and
>> where that file must be located?
On Fri, Jul 27, 2012 at 7:17 AM, matt <m...@mattsmessyroom.com> wrote:
> I prefer to keep it in a module, so for instance there is a module
> "helloworld". In the site/app/modules/helloworld folder place a "templates"
> folder and put your template "formname.tpl" there. Have it submit to
> something like "formname-submit". (This will resolve to
> "/helloworld/form-submit) Then in the "initializeForPage()" function for
> this helloworld module make a "switch/case 'formname-submit':". Place your
> logic for the form here. You'll also want to add a blank
> "formname-submit.tpl" file so the system doesn't bark at you.
> On Friday, July 27, 2012 3:42:22 AM UTC-4, Juan Carlos Garcia wrote:
>> Hello everyone:
>> Could anybody help me please, I have an html form in a tpl file, but in
>> the action parameter how can I redirecto to a php file that I create and
>> where that file must be located?