简体   繁体   中英

Joomla Programming - Creating Custom Forms (First Steps)

I'm quite new to joomla programming. I'm supposed to make a form together with coninciding database table. As of the moment, I'm quite confused on the things that I should take a look at.

What should be the first thing that I look at? Should I look at the components concept? I come from a Java background so this is still quite confusing for me. I've already seen several forms extensions for joomla, however, i'd like to be able to create my own form from scratch.

What are the first things I should look at? Would appreciate it if you can give me pointers.

Thanks

Depending on the size of the form I would use a module rather than a component if it's going to be fairly simple. To get you started off with a module, you can use the Module Generator. Make sure you set " Helper File " to " Yes ".

Ok basically, lets say your module is called " Test Form ".

You are going to have 3 main files:

  • helper.php - This file will include all your functions
  • mod_testform.php - This will contain things such as calling some functions if need be, defining parameters, adding in custom CSS and JS etc. Bascially a controller.
  • default.php - This is for the html of the form. It can also be used to import css and javascript files. Obviously PHP is allowed but I would refrain from adding functions in here.

Also have a look at the following page:

http://www.techguywebsolutions.com/create-a-custom-joomla-2.5-module.html

Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM