Monday, May 20, 2013

Joomla 2.5 MVC Frontend Custom Form - Step2

On this post I hope to explain how to design joomla frontend custom form.Please open the joomla project you’ve installed com_myresourcelist  using your favorite php editor.In my case I’m using Eclipes IDE.
Goto components –> com_myresourcelist –> models folder.
Add new folder named forms and empty index.html file to this location.
Add new file called joinwithus.xml to forms folder.


This file describes what are the form fields are containing on our front end form.You can get more details about these field types from here.My sample component is supporting for localization.Localization file for our frontend is in components –> com_myresourcelist –> language –> en-GB –> en-GB.com_myresourcelist.ini. Update it as following.

Update components->com_myresourcelist->models->joinwithus.php as follows

Update components->com_myresourcelist->views->joinwithus->view.html.php

Update components->com_myresourcelist->views->joinwithus->tmpl->default.php

Go to link you’ve created for myresourcelist component.It will display the form as follows.
formview1
Next post I hope to show you how to save data in database.





No comments:

Post a Comment