Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create my own form in joomla

Tags:

joomla

People also ask

How are mandatory fields indicated in Joomla creation forms?

To define form fields in the configuration of an extension, you must include them in a named fieldset, such as <fieldset name="basic"> , that is within the <fields name="params"> section of the <config> element in your XML manifest file.


If you just want to get your work done, there are some components already avaiable in Joomla Extension's website to your form's needs. CkForms is a good one, you can create simple forms with it that are automatically saved in the database (supports upload of files too).

If you want to learn how to write extensions in Joomla, you should read Joomla Official Documentation website.

Extensions in Joomla are divided in "Components", "Modules" and "Plugins". More informations about these differences can be found here and here.

What you're trying to achieve sounds a "component" to me. Downloading the CkForms and reading it's source code should get you started to Joomla's way of writing components.

EDIT: Joomla has a huge API with a lot of features. It has a database module of it's own, with insert methods and such. Reading Joomla's API website before implementing your component it's a good idea to avoid "reinventing the wheel" and it's a good practice since those methods are extensively tested by all Joomla users.


The JForm class helps you build forms.

Documentation can be found here:

  • joomla CMS: http://docs.joomla.org/API16:JForm
  • joomla API: http://api.joomla.org/11.4/Joomla-Platform/Form/JForm.html

This class provides you with ready to use form elements and form loading and/or processing methods

This class includes validation methods, date picker control, color picker, etc.

Of course, as another mentioned above, if you are building a module, component, or application, you will need to learn how to to develop a module, component or application. Of these three, the module is the easiest to implement.

The application gives you much freedom b/c you are not constrained to the CMS paradigm, front and back end complexities. However, there is little documentation about how to develop applications with Joomla framework b/c joomla as a framework is relatively new

This tutorial gets you started understanding how to use JForm to create a form in Joomla: http://www.ostraining.com/blog/how-tos/development/getting-started-with-jform/


Or you could just create add a html module to any position and then write the form in html i.e.

<form method="post" action="mycreatedpage.php"> <input  type="text"/> <input type="submit">

Now just create a page that handles the code by emailing or inserting into db. I havent tried it but i think it should work.


Looks like everyone already told you almost everything I know except for the component creator. Very easy to use, and it follows Joomla standards. Will get you up and running within minutes.


I have got good working experience with Joomla RSForm Pro. It has got options for

  • validation
  • user email/admin emails on submit
  • file uploads
  • and many more

Good tutorials too. Get started with http://www.rsjoomla.com/support/documentation/view-knowledgebase/21-rsform-pro.html

Good luck!


  1. Create View.
  2. Create Model.
  3. Create Table.
  4. Create Controller ( if Needed ).
  5. Create Form xml file.

Go here for more information: http://docs.joomla.org/Standard_form_field_types


Take a look at the Chronoforms extension - does more than you want.