Skip to main content
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
  • 12k
5 votes
Accepted

Prefill subform with data rows

You need to put the subform data one array deeper. This is because your subform has multiple attribute which means the data should be represented by multiple rows: $prefillData = array("contacts&...
Sharky's user avatar
  • 12k
4 votes
Accepted

Is there an easy way to build a form in Joomla that stores the currently logged in user's name?

If you don't need to use the username for something else (which might require coding that you're trying to avoid), I know that RSForms has global placeholders for data it automatically saves for the ...
Patrick Jackson's user avatar
4 votes

Is the following everything one should do to prevent SQL injection?

First, when reading user input you should make sure it's the correct type. The Input/Filter APIs don't handle array/string conversion. So if you're expecting STRING filter to return a string be aware ...
Sharky's user avatar
  • 12k
3 votes

Assign user to a specific group based on custom field selected

Write user plugin which will have the below file structure plugins/user/plugins_name/ plg_add_group.php plg_add_group.xml plg_add_group.xml - Write plugin manifest code here you can ...
Sudhir Sapkal's user avatar
3 votes
Accepted

How to to create a multi-layered form system

The short answer is: you will need the assistance of a Joomla Programmer as it's highly improbable you'll find a plug-in that suits your requirements. First of all, I think what you are looking for ...
NivF007's user avatar
  • 2,097
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

joomla loadFormData

I ran into this as well and have learned the following: the loadFormData can indeed used to load previously saved data back into the form and Joomla does not seem to set the form data to the user ...
Isolde's user avatar
  • 131
3 votes
Accepted

User Registration Assign to Specific Group

Briefly, these are your main options: Write a custom user registration component Write a User Plugin that will handle the usergroup of the registered users Use 3rd party Form extensions which ...
FFrewin's user avatar
  • 19.8k
3 votes
Accepted

Component/module for registering to get document

You can create a form that prompts for an email address and then provides a download link using most of the forms extensions available in Joomla. There are plenty of them available at https://...
Neil Robertson's user avatar
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

Joomla! 3.8 - How to hide Publishing Tab in front end

Apart of customizing the Article Edit Form - you could consider using 3rd party extensions. There are 2 major types/categories of extensions that would be suitable for this: Front-end article ...
FFrewin's user avatar
  • 19.8k
2 votes
Accepted

Joomla! 3.8 - How to hide Publishing Tab in front end

Okay, a solution has been found. It appears that somewhere in the back end a new article requires the category to be set. It also appears that its a lot easier to pick and choose what items to see in ...
MaxVK's user avatar
  • 181
2 votes
Accepted

Component/software recommendation?

Forms Extensions Many of the forms extensions can help with redisplaying and editing submitted data. ChronoForms can certainly do this. RSForm! Pro can probably do this also. Forms extensions in ...
Neil Robertson's user avatar
2 votes

Joomla 3.7 change value in database after form button press

Since you are using a form extension you need to do it following its options and features. I haven't that big experience with Chronoforms but I would look for an on-submit option to run custom code. I ...
FFrewin's user avatar
  • 19.8k
2 votes
Accepted

Don't add empty fields to database after submission?

There's no generic answer to the question because the code that sits between a form submission and a database table varies wildly from application to application. Perhaps more importantly, different ...
jamesgarrett's user avatar
  • 3,339
2 votes

How to develop a survey extension which prevents respondents from taking a survey more than once?

Some more ideas: Save a cookie in the user's browser. Get users IP address and store in BD.
Piero Marsilio's user avatar
2 votes

Joomla post requests

The problem was me not adding the Cookie manager at the dtart of the code, as such for every get request to the server i received a new Token, and so after adding the Cookie manager i was able to get ...
user71381's user avatar
2 votes
Accepted

Cannot extend my custom component's validation rules -- does not validate

Just do addrulepath="components/com_mycomponent/models/rules" and leave out the /myrule.php. I presume you're terminating the <field .../> ok in the XML and adding <?php at the start of ...
Robbie Jackson's user avatar
2 votes
Accepted

Update List field rendering after ajax update

If you're using ChosenJS, which is the fancy select library that Joomla 3.x uses, then you'll need to manually instruct it to update the list, because it doesn't use any observers by default. You can ...
Lodder's user avatar
  • 26.9k
2 votes
Accepted

Pop up AcyMailing subscription form

I see that you have modelled your development upon this page: https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_toggle_class However, that demo has a separation between the element with the ...
mickmackusa's user avatar
  • 4,846
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
2 votes

How to dynamically reload admin-form-fields in Joomla

I consider this a very valuable question that does not have good write-ups/tutorials yet in Joomla documents (we should create one). I am trying to give here some workable info on this. Loading Form ...
Zollie's user avatar
  • 2,956
2 votes
Accepted

custom form list field add disabled options - create optgroups

My question could be solved by the comments of mickmackusa and Sharky. I have finally extended the JFormFieldGroupedList as follows: defined('JPATH_PLATFORM') or die; JFormHelper::loadFieldClass('...
Marco's user avatar
  • 691
2 votes

Component/module for registering to get document

Acymail is a very good extension that would allow you to register/collect email addresses and you can then send one or more follow up emails which could be your document or have your document attached ...
Irata's user avatar
  • 4,361
2 votes
Accepted

Changing plugin parameter field value dynamicaly

You're actually doing it as intended within Joomla. Here's a bit of background to explain why you're right, and for the sake of others who may be interested. Overall the Joomla Form Basic API guide ...
Robbie Jackson's user avatar
2 votes
Accepted

Get the form fields as defined in the form xml file

There is Joomla\CMS\Form\Form::getFieldset() method for returning an array of fields belonging to a fieldset as Joomla\CMS\Form\FormField objects. $fieldNames = []; foreach ($form->getFieldset('...
Sharky's user avatar
  • 12k
2 votes
Accepted

Create Custom Form via SimpleXMLElement

Unfortunately the Joomla error message is a bit misleading here. It's not complaining about your $xml element passed in, but rather than the basic <form> structure hasn't been initialised ...
Robbie Jackson's user avatar
2 votes
Accepted

How to set Form Field Client-Side Validation Error Message?

For static text use data-validation-text attribute: <input name="test" class="form-validate validate-test" data-validation-text="Value is invalid"> In case you're ...
Sharky's user avatar
  • 12k
1 vote

Associate template to getMailer class

Within Joomla you could use JLayout. $body = JLayoutHelper::render('path.to.layout'); $mailer->setBody($body); If you have any variables you need to use in the layout, pass them as second ...
Sharky's user avatar
  • 12k

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