html - Adding forms to joomla's front end component view -


i'm developing component using joomla 3.0. i'm trying add forms in component. saw joomla has jhtml class adding forms in backend.

what recommendation creating forms in frontend. should use jhtml or clean html markup ? , can find docs class.

jform jmodelform jcontrollerform

forms save data in databas in joomla 1.6 + use jform package manages forms (xml or xml strings), fields (the actual fields) , rules (validation).

the normal way simple way manage extend jmodelform , jcontrollerform. if in core you'll see these extended in places might not expect such single contact view that's because classes provide basic set need manage form on part of page if rest of has nothing forms.

alternatively can create new jform object.

if have models folder have forms folder , if needed fields , rules folders. latter 2 contain custom fields or rules may need extension. these found default when building form in extension if want them somewhere else need use addfieldpath or addrulepath or addformpath needed in form xml.

jform provides standard set of fields , rules standard list of filters. rules means validation while filters change saved values. can use filter available in jfilterinput.

if give field same name field in current table object data automatically saved in field. if use fields tag name matches field default fields listed inside tag saves json string within field.

that's pretty basics, though there lot more.

one important thing me if use jform default filtering , selectively allow html etc default secure.


Comments

Popular posts from this blog

php - mySql Join with 4 tables -

css - Text drops down with smaller window -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -