Getting Started with Amilma Forms

Summary: This guide outlines the essential steps to instantiate and render a form within a PHP application.

To successfully build and display a form, the implementation requires four distinct code blocks integrated into your page structure:

  1. Instantiation: Place the first block at the beginning of the page to include the autoloader and instantiate the form object.

  2. CSS Assets: Place the second block within the <head> section to call the required CSS files for plugins using $form->printIncludes('css');.

  3. Rendering: Place the third block within the <body> to render the HTML using $form->render();.

  4. JavaScript Assets: Place the fourth block before the closing </body> tag to call required JS files and active plugins using $form->printIncludes('js'); and $form->printJsCode();.