Skip to main content
8 votes
Accepted

How to get module parameters inside helper function and how to get params inside a custom form field type?

1. How to get Modules parameters inside Helper Function You are going all wrong with this. First, you can't use $this inside a static method, because they are independent of any instantiated object. ...
FFrewin's user avatar
  • 19.7k
7 votes

How to get module parameters inside helper function and how to get params inside a custom form field type?

I much prefer going for the OOP approach. This is what I use in one of my extensions. It's Ajax based so I have a separate function to get the parameters. helper.php: class ModSomethingHelper { ...
Lodder's user avatar
  • 26.9k
7 votes
Accepted

Calendar Field Showing Incorrect Date

When no filter is specified for a calendar field, the system will automatically apply the 'user_utc' filter. According to Joomla!'s documentation, this filter, "calculates the specified value to the ...
Zachary Draper's user avatar
6 votes
Accepted

Form Field showon:"empty

Yes it is possible to do this: showon="foo!:"
TheNextStage's user avatar
5 votes
Accepted

What does sql_select="e.*" do?

I guess the example you are talking about is this: "SELECT e.* FROM #__example AS e GROUP BY name ORDER e.id ASC" Ths basically mean select everything from the table #__example (which has an alias ...
Daniel Dimitrov's user avatar
5 votes
Accepted

How to generate a dynamic note field for a custom component?

Use Form::setFieldAttribute(). Typically, this is done in the model's getForm() method. However, if it's cosmetic only, it can be done in the view too. In /administrator/com_image/models/forms/image....
Sharky's user avatar
  • 11.5k
5 votes
Accepted

How to override a form field in Joomla 4

Apparently, you need to use namespaces in your extension to override fields with the same type. This is because of the class lookup order: Namespaces added using addfieldprefix attribute or Joomla\...
Sharky's user avatar
  • 11.5k
4 votes

How to get module parameters inside helper function and how to get params inside a custom form field type?

Your main module file and template file will have $params variable created by Joomla! core. If you have static methods, then pass that variable to function call: class ModTestHelper { public ...
Rene Korss's user avatar
  • 3,208
4 votes
Accepted

Form field "checkboxes" mutliple default values

Set a comma separated property "checked" in the XML file rather than using default and you should be good. We also do not call trim on the comma separated values as having spaces in values is allowed ...
George Wilson's user avatar
3 votes
Accepted

Documentation tutorial: Why is my JFormFieldList showing a textbox?

The problem is that it is not able to get the field. I see filename you have defined as ulwiz_wmode.php and in class name you are using this JFormFieldUlWiz_WMode. Make sure the naming convention is ...
Liz.'s user avatar
  • 1,385
3 votes
Accepted

Where can I find a good tutorial and/or example for creating front-end forms in custom components?

Everything you need to get started with JForm for views https://www.ostraining.com/blog/how-tos/development/getting-started-with-jform/
Walt Sorensen's user avatar
3 votes
Accepted

XML form related fields

Have you tried to use Subform field?. It allows you to nest XML forms inside each other or reuse your existing forms inside your current form. And your need, you can combine it with showon attribute.
webchun's user avatar
  • 2,418
3 votes
Accepted

Subform multiple data not saving

In your table's bind function, add this: if ( ( !empty( $array[ 'list_links_url' ] ) && ( is_array( $array[ 'list_links_url' ] ) ) ) ) { $this->_jsonEncode[] = "list_links_url";...
Stuart Steedman's user avatar
3 votes
Accepted

Dynamic fields in module parameters

No answers here, but I have managed to work it out for myself. The answer is actually to use both of the solutions I had in mind already -- a custom field type and a subform. My solution works like ...
Simba's user avatar
  • 610
3 votes

Problems with Custom form field select list

You can check the field from where it is coming, <? php echo $this->form->renderField('partno'); ?> This line rendering your field 'partno', by looking into generated html it seems it is ...
Sudhir Sapkal's user avatar
3 votes
Accepted

Problems with Custom form field select list

raVan96 is bang on, you should have either a sql field or a list field. But, what you have was an sql field that you have replaced with a custom list field. There are two main issues. The form xml ...
jamesgarrett's user avatar
  • 3,299
3 votes

What does sql_select="e.*" do?

When you are only referencing one table in your query, there is no need to explicitly reference the table when writing columns. Also, the default order direction for sql is ASC. So your syntax could ...
mickmackusa's user avatar
  • 4,826
3 votes
Accepted

Creating a field plug-in, need the com_content form to be enctype multipart

There really isn't a good way to do this. Your best bet is parsing the already generated HTML and making a replacement there. For the component this can be done using onAfterDispatch event. Below is a ...
Sharky's user avatar
  • 11.5k
2 votes
Accepted

Media field use local or remote file

If you want to use external images for intro or full article image, then you can just paste the image's url in that field. Similarly, if you want to use external image inside your article body, you ...
FFrewin's user avatar
  • 19.7k
2 votes

Creating custom form field type extended from standard tag field

I have found the easiest way to do this is actually not to use the tag form field at all. I know that sounds crazy, but when you want to store the tags and tag associations in your own database table, ...
Zachary Draper's user avatar
2 votes

Subform multiple data not saving

I know this is an old issue, but since a came across this post on my own research I would like to share my solution. Unfortunately I cannot trace back at which Joomla version this possibility was ...
Mark's user avatar
  • 21
2 votes
Accepted

How to Order the fieldsets for a joomla module manualy?

It is technically possible to achieve, but modules aren't really designed with that in mind, so you'd have to override a com_modules view. Personally, I think you have to have strong reason to change ...
RichardB's user avatar
  • 3,082
2 votes

Save multiple list custom field for component

I found the solution on this so i share it jsut in case someone else needs this. I've added part of code in 2 places. First on the table file, in bind function: if (isset($array['...
dip's user avatar
  • 53
2 votes

Custom Form Field not working in Windows environment

If you field is in the administrator, you want to use this include path: JFormHelper::addFieldPath(JPATH_COMPONENT_ADMINISTRATOR.'/models/fields'); Oh and you want that filename to be lowercase (as ...
David Hayes's user avatar
2 votes

Tags filter field - how to add custom "placeholder"?

Create a language override for the constant: JGLOBAL_TYPE_OR_SELECT_SOME_OPTIONS Extensions > Languages > Overrides Create a new override Type/paste "JGLOBAL_TYPE_OR_SELECT_SOME_OPTIONS" as the ...
Michael's user avatar
  • 593
2 votes
Accepted

Showon="foo:1[AND][bar:2[OR]bar:3]"

update (removed my incorrect answer) I was looking at the JS that parses these showons and it seems that using more than one AND/OR chain isn't going to produce correct results. Only the last pair's ...
Drew G's user avatar
  • 890
2 votes
Accepted

List of users in form

User type field doesn't support multiple attribute. I can think of 3 options: Create a custom field type with multiple support. You can use Author field as example. Just change the query to be a ...
Sharky's user avatar
  • 11.5k
2 votes
Accepted

Calendar Field render error "Double timezone specification"

My suggestion would be, simply change the database field to varchar or text for saving this form field and then the error should be gone. Then you can get back the string format date values from the ...
Zollie's user avatar
  • 2,946
2 votes
Accepted

Is it possible to edit the SQL custom field to be multi-select?

When creating/editing the field, set Multiple option to Yes. Or edit Fields - SQL plugin to enable multiple option globally for all SQL fields.
Sharky's user avatar
  • 11.5k
2 votes
Accepted

How adjust "Maximum upload size" indicator for file upload?

If you'd like to perform this override for all file form fields only within your component, then you can override the layout at component level. To do this copy the following layout: layouts/joomla/...
Lodder's user avatar
  • 26.9k

Only top scored, non community-wiki answers of a minimum length are eligible