As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [form]

A web form, also called html form, is a special html element consisting of several input elements, that allows the users to enter and send data to the server. One of the most common type of forms are the contact forms in websites.

Filter by
Sorted by
Tagged with
0 votes
1 answer
232 views

Using a custom field with different names

I want to use a flexible field name for a field across different forms thru my extension. My custom example field looks like this: defined('_JEXEC') or die; use Joomla\CMS\Factory; use Joomla\CMS\...
1 vote
1 answer
32 views

Changing plugin parameter field value dynamicaly

I have a plugin which needs to change its parameter configuration depending on some conditions upon configuring in backend. The plugin using the SubscriberInterface because it is listening to some ...
1 vote
1 answer
142 views

Contact Form Non Unique id #jform_id

Joomla 3.9.14 When I open a contact to edit their details and look in the browser console I can see the following notice; [DOM] Found 2 elements with non-unique id #jform_id: (More info: https://...
0 votes
1 answer
120 views

Manually render Clear form button in layout

I followed instructions here and I render some fields in my front end view, like this: echo $this->filterForm->renderField('search', 'filter'); Now I wonder how to manually add a clear button. ...
1 vote
1 answer
176 views

Where do I add php code to submit an HTML form?

I am new to Joomla, and so far, I used the basics to make a simple website. I decided to try out making a component, using JCB, that has a database of a list of items, and for each item, there is a ...
0 votes
2 answers
125 views

handling simple module form

I'm new in joomla, I created a module for learning purpose, let name it mod_form1, I don't know what framework or class in joomla i should use for this so I use plain HTML. this is my tmpl/default.php ...
0 votes
1 answer
66 views

Dynamic Form based on Signed in User

I am a total noob in coding. Back in engineering school we had some coding classes and I was good at it but I never really focused on that. I know some python and c# and that is about it. I have a ...
2 votes
2 answers
271 views

Custom multiselect field not working in J4

In my Joomla 3 component, i have a custom field that is a select list with multiple=true. The values of such an select list are binary handled like 1,2,4,8,16. When storing, the values are getting ...
1 vote
2 answers
176 views

Access parent field value out of subform

I made a custom field and using it in a subform looking somewhat like this: <config> <fields name="params"> <fieldset name="basic" addfieldpath="/...
1 vote
1 answer
22 views

Display only one Category and its sub-categories

I have created a custom filter.xml to search for specific documents. Using Joomla's category system, I have also create 3 main categories. Courtrolls, Newsletter and communique. In my filter form, I ...
1 vote
2 answers
639 views

How to dynamically reload admin-form-fields in Joomla

In a custom component, I'm developing an admin form with 2 fields, a combo-box for jobTitles and checkboxes for technologies. Both fields are loaded from a database table. The values of the checkbox ...
3 votes
1 answer
41 views

Prefill subform with data rows

Im trying to prefill my subform with datarows from the database. newcustomerform.xml <?xml version="1.0" encoding="utf-8"?> <form addfieldprefix="Mydestiny\Component\...
0 votes
0 answers
19 views

Joomla 4: Is it possible to add data from a category blog override into a contact form override?

Summary: I want to pull in Joomla field and input values from a category blog and insert them into a contact form. Background: I have created an alternative menu item based on the category blog for ...
0 votes
1 answer
56 views

Free Joomla extension that can read and write in a MySQLi database, with sanitization

I am working on a website I volounteered to do for free (because it's for an organization I'm part of, and because it will make our lives easy). Our budget is "as low as possible", ideally 0,...
0 votes
1 answer
92 views

loadForm change behaviour from J!3.9 to J!4.0 and data not loaded with the form

In my component in a model backend, I'm loading a form but since moving the code to be used on J!4.0 the data associated to the form isn't loaded anymore. The loadForm is called: https://github.com/...
0 votes
0 answers
20 views

OnContentPrepareForm load xml based on article data

I'm trying to figure out how to conditionally load extra form fields into articles. I have made succesfully a plugin that add fields: function onContentPrepareForm($form, $data) { $app =...
3 votes
1 answer
232 views

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

In order to sanitize the user input in an article insertion form (title and HTML content), here are the bits that I've included: Use of JInput: $jinput = JFactory::getApplication()->input; get ...
1 vote
1 answer
1k views

Assign user to a specific group based on custom field selected

I'd like to assign a user to a custom group instead a some standard Joomla group, based on a dropdown choice. I've created a user group named "students". Then I added a new custom custom field for ...
2 votes
2 answers
130 views

Component/module for registering to get document

I'm looking for a way to have users register their email and then get sent a document, like you often see on sites offering white papers. I've looked at many of the download extensions on the JED but ...
0 votes
0 answers
37 views

Manipulate values of form before sending

A customer of mine has a Joomla website with several forms. When submitting these forms an email is sent to my customer with the content. Unfortunately the preset values ("value if empty") ...
2 votes
1 answer
654 views

How to override a form field in Joomla 4

I have the following field in my module's XML: <field addfieldpath="/modules/mod_xxxxxx/fields" name="icon" type="filelist" label="Icon" />...
0 votes
1 answer
43 views

Getting object value from form fields

when i do a var dump of ($fields), i get this. i am trying to get the object element => @attributes => article protected 'autofocus' => boolean false protected 'element' => object(...
0 votes
1 answer
252 views

Joomla post requests

I'm trying to make an android application and so i want to connect it directly to my Joomla website, i want to send some post requests but they are getting denied, I'm not asking for any help ...
1 vote
1 answer
38 views

Should language file definitions/translations be used by multiple forms with the same text?

If you have a set of forms and some of the same fields are used on each form, do you create a language definition for each form's version of the field or just create a definition for the field? For ...
2 votes
2 answers
2k views

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

My registered users can log in to see, create and edit only their own articles. This works fine. However, when a user creates or edits an article, the "Publishing" tab appears at the top with "Content"...
3 votes
1 answer
70 views

How to to create a multi-layered form system

I am new to Joomla and I am trying to create a form system whose questions will change depending on what was previously answered. The idea is to store this data into a database and allow other users ...
0 votes
0 answers
28 views

When I save form data on a Joomla site to the database, Joomla logs me out

I am trying to make a Joomla-based warranty registration system. Recently, I was able to turn on the possibility of registering new users and logging them in. Only registered/logged-in users will be ...
1 vote
0 answers
28 views

Form With Buttons That Don't Submit Data

I am trying to make a page that performs various functions in vanilla Javascript. One of the functions involves submitting form data to Joomla. However the issue I have is that Following the following ...
2 votes
1 answer
225 views

custom form list field add disabled options - create optgroups

I have a working list based on an sql query. Now I would like to add some spacers (not selectable items). When doing this manually in xml you can add the disabled attr to that item, but how can I do ...
1 vote
1 answer
900 views

How to make form action to work?

I'm learning how to make my own module on Joomla. MyModule mod_planejamentomensal.php is like this: //No direct access defined('_JEXEC') or die; require_once dirname(__FILE__) . '/helper.php'; ...
0 votes
1 answer
159 views

Reload Item View with a Button and send a variable to the session

I try to add the possibility to my component to unlock content within the component item view. If you watch the item view page, you see a description and an image and a little button. If you click the ...
1 vote
1 answer
241 views

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

Joomla prints a short notice regarding the Maximum upload size when including a file upload field with the standard form field file, see code and image below: <field name="image" ...
1 vote
1 answer
86 views

Save/load a custom form inside a new tab in the article edit view

I have a plugin which loads a custom form in a new tab inside the article edit view. So far, no problem with this part: public function onContentPrepareForm(Form $form, $data) { // Check we are ...
1 vote
1 answer
209 views

Pop up AcyMailing subscription form

I am trying to build a Joomla website with an AcyMailing subscription form. I'd like the form to be a pop-up window. I have researched thoroughly and I have achieved most of what I want. Now I have a ...
1 vote
0 answers
22 views

Fabrik security issue: input tag attributes expose database table prefix

In the generated HTML for the input field, the id and name attributes shows the Joomla database table prefix. Exposing the database prefix is a security concern. Is there a way to prevent this? <...
2 votes
1 answer
980 views

Update List field rendering after ajax update

for one of my extensions i need to update a select list by ajax. the whole ajax call is working and i got the new option vars for the select list. I add those options in the ajax's "success" function ...
2 votes
2 answers
720 views

Js/Ajax function into a Js file doesn't work

I'm not a programmer (This is my hobby, but I like to learn new things). :) I'm developing a JComponent on my side, and I need to integrate an Ajax Call in order to check something. But I have this ...
1 vote
1 answer
2k views

Error "Uncaught TypeError: Cannot set property 'value' of undefined" on submit form

I'm getting the following error when trying to submit a form using Joomla.submitbutton('book.submit') The error I get is: Uncaught TypeError: Cannot set property 'value' of undefined at Object....
0 votes
0 answers
46 views

Form only posts regular HTML inputs (not posting XML fields)

I have a form (with XML fields) and it posts only the hidden fields type and other regular HTML inputs. It doesn't post the XML form. My form <form action="<?php echo JUri::base().'getpost'; ?&...
0 votes
0 answers
126 views

Submit an XML form via AJAX using Joomla.submitbutton/form

I know there are a few questions regarding how to submit forms with AJAX but i could not figure out how to do it in my case. Should it be something like this? $("#adminForm" ).submit(function( ...
0 votes
1 answer
132 views

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

I'm following along with this tutorial https://docs.joomla.org/J3.x:Server-side_form_validation My form <form> <fieldset name="form_name" addrulepath="components/com_mycomponent/models/...
0 votes
0 answers
34 views

Display a form and post it to dabase

I want to insert a form in a default.php file and post it to the database. How should it be done? By adding an XML form or creating a regular HTML form and posting it to the database through a ...
2 votes
1 answer
52 views

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

I have a form created with the breezingForms extension for Joomla. I'd like to store the currently logged in user's name with the form. I don't need to continue to use the same extension. However, ...
3 votes
1 answer
746 views

User Registration Assign to Specific Group

Joomla 3.9.14 I have a URL example.com/training/register, this displays a default Joomla user registration form. Within Joomla I have various user groups; - Guest - Registered - - Training - - ...
0 votes
2 answers
568 views

Convert article to PDF?

I was wondering if anyone knows of any way to take the HTML content of a custom module which is placed inside an article and convert the HTML to PDF via the click of a button or so. So basically the ...
0 votes
0 answers
145 views

Joomla datepicker field issue

Can someone help please? I'm working on a simple component which displays events. The component allows events to be submitted from the frontend. The form uses the Joomla datepicker. The problem I'...
2 votes
1 answer
72 views

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

I'm looking for advice on how to make a survey for my Joomla production (3.6.4) site. A key requirement is to restrict respondents to only taking the survey once (i.e. preventing 'ballot-box' ...
3 votes
2 answers
1k views

Joomla CSRF form validation

I have noticed this happen occasionally with a component I am working on. I use JHtml::_('form.token') in the form and JSession::checkToken() or die('Invalid Token') to check it once i receive the ...
1 vote
0 answers
44 views

How does com_contact caching work when it has a form token?

I've been looking into conservative caching recently and felt I'd got my head around it. However, when I added it to a site, I was surprised to see that the core component com_content caches forms. ...
7 votes
1 answer
2k views

Joomla token with ajax request

I've built a module that requests some data from the server via an ajax request. It includes the Joomla token to validate the session. An odd thing is happening-- when I open Chrome and load the page,...