8 votes
Accepted

JForm showon attribute does not work in admin site

Found what the issue is. I was using getInput function to show the field. $this->form->getInput('field2'); but showon attribute working only if I render the field using renderField function $...
Nagarjun's user avatar
  • 2,991
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
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.8k
7 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.6k
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
  • 10.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
  • 10.5k
4 votes
Accepted

Filter for filelist box to load only png files

Use filter="png" instead of filter="*.png" (remove *.)
Sumeet Shroff's user avatar
4 votes

Remove Archived option from status field

You can either make your own options (see Hasanalsamra's answer) or use the filter option of the status field: <field name="state" type="status" filter="*,0,1,-2" label="...
fruppel's user avatar
  • 3,723
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

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
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

Remove Archived option from status field

Yes, you can make your own options, here is how: <field name="state" type="list" label="JOPTION_SELECT_PUBLISHED" onchange="this.form.submit();"> <option value="">...
TheNextStage's user avatar
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

How to use a regex to validate a FormField?

If there is no native answer I have a solution to do this with an own JFormRule class. Create a file in your component/models/form/rules directory called regex.php Insert the source below class ...
Harald Leithner's user avatar
3 votes

How to use a regex to validate a FormField?

You can use Client Side Validation for this, however You will need to make a Custom Form Field for this to happen. Assuming you're using Joomla 3.4, you first need to initialise the validation script,...
Lodder's user avatar
  • 26.8k
3 votes

Let JForm-Fields be dependent on eachother

Yes this is possible but is a major work around. Joomla has two required verification events. One in he browser and the other on the server just before saving of the form. The browser is the easy part ...
Llewellyn's user avatar
  • 401
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,375
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,279
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,771
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
  • 10.5k
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,072
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.6k
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

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

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