1
votes

I'm getting frustrated with my own inability to find a source of information regarding what options / attributes are to be used when defining the XML file for a form in a component.

The file I'm talking about might be located in /administrator/components/com_report_wiz/models/forms, as an example. It defines the field to be used in the admin form for a component. I used a component creator to build a sample component as a learning experience. It created an xml file in that folder which has fieldset elements that then contain field elements. This us then used with the getLabel and getInput methods of JForm to generate the form shown in the admin interface. That's terrific!

But, after spending hours Googleing everything I could think of, I still can't find any reference that shows what types of fields are available, and their parameters/options. I've found lot's of tutorials and such regarding creating custom field types, and that's been interesting.

In the file I'm looking at, for example, the following creates a simple text input field in the form:

<field name="rpt_appname" type="text"
    label="COM_REPORT_WIZ_FORM_LBL_REPORT_RPT_APPNAME"
    description="COM_REPORT_WIZ_FORM_DESC_REPORT_RPT_APPNAME" 
    default="None" 
    maxlength="100" /> 

I would love to find some reference that lists the different possible values for the "type" attribute, and the parameters that can be used with each.

I'm beginning to think I'm dumber than a box of rocks since I can't figure out where to find information on some of the most basic parts of Joomla! development. The docs that are auto-generated from the code are less than helpful to me since they don't explain the parameters to functions. It's nice to know what parameters a method/function expects, but it's more helpful to understand what those parameters are and contain.

The tutorials have been helpful, but are mostly too basic to use for more advanced features, or at least as a source of information. They have been great, and I really appreciate the effort the authors have put into them, but now that I've gone through them, I find it difficult to discover the info needed to write a proper, complex component. With a system as complex and extensive as Joomla, it seems that there should be a place to find out how to use the wonderful abilities it provides without having to resort to reading the source code.

Any suggestions about where to search, search terms would be greatly appreciated!!

1

1 Answers

1
votes

The first starting point would be to look at the Joomla! Documentation - I know sometimes it is frustrating to use it, but give it a change. It gets better and better as we speak.

Typing in the search box text will get you to the page Text form field type. Also in the documentation you will find a list of Standard form field types.

My favourite way of doing is directly inspecting the code in JOOMLA_ROOT/libraries/joomla/form/fields for the needed form type. You get to see there all the parameters and quicklier understand why something does not work the way you think it should work.

Since you are new to Joomla, your questions might get a better attention at the Joomla! Q&A site.

Hope this answers your question.