The easiest way to do it would be to leverage the vendors folder.

CakePHP allows you to easily integrate outside classes this way. All
you have to do is pop your class file(s) into the vendors folder and
then you can reference them from within your CakePHP code. However, It
may require some refactoring on your part in order to make the form's
code fully object-oriented (if it is not already).... and if you have
to go to that extent, you might as well re-implement it in cake
anyway.

But if you want to proceed in this manner, then it would simply be a
matter of making a controller in cake, write a function like
"showform", and then call a function to display the form from your
class.

function showform() {
  $this->autoRender = false; // This will turn off cake's default
behavior to render a view for the action
  $myForm = new MyFormClass();
  $myForm->renderForm();
}

Good luck,
James

On Nov 10, 10:28 pm, TimA1116 <[EMAIL PROTECTED]> wrote:
> I would like to integrate a 6 page form created in PHP 5.2.5 into
> CakePHP.  I have looked at various posting here and I've tried to
> implement what was instructed.  However, I am at a loss as to how to
> proceed even though there must be away to accomplish what I'm trying
> to do.
>
> I would very much appreciate a step by step (kindergarden level) how-
> to inegrate php code into cakephp framework.
>
> I have a folder, named "app_form", which contains all my files.  My
> code will do all the work.  I just want CakePHP to render the output
> of my files.
>
> 1.  Where do I put app_form?  If you suggest the "views" folder, which
> one as there seems to be a gazillion of them?
> 2.  Where do I create the controller for accessing my files and what
> do I put in the controller?  Should I create something else like an
> element?
> 3.  What should my .htaccess say with regards to my files in app_form
> and where should that .htaccess be located?
> 4.  What else am I missing?
>
> Thanks in advance for your help!
>
> Tim
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to