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
76 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 ...
0 votes
1 answer
14 views

Custom Rule (checked) for ClientSide Validation

I have a Form that includes two radio inputs both based on this field structure: <field name="privacy_policy" type="radio" layout="joomla.form.field.radio.switcher"...
2 votes
2 answers
437 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 ...
0 votes
0 answers
22 views

Disable single option in list-fancy-select

When using a custom select list field i can disable single options in it by setting an attribute. Here a simple version: <field name="somefield" type="mylist" label="...
1 vote
2 answers
207 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="/...
0 votes
2 answers
46 views

Get the form fields as defined in the form xml file

I have a set of fields that have been defined in an xml file and then I load the fields with $form->loadFile('myFormName'). Before displaying the fields I would like to manipulate the fields based ...
0 votes
1 answer
26 views

how to extract data from joomla website into csv file

Users enroll for courses on my website. I want to know how to extract that information into a flat file (csv file)
0 votes
1 answer
236 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
147 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
150 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. ...
0 votes
1 answer
77 views

Cannot access form in Joomla 4 frontend

In Joomla 4.3.4 I have created a menu item Create Article for a specific category. When I try to create a new Article and enter the edit view, I get the following error: 0 htmlspecialchars(): Argument ...
1 vote
1 answer
208 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
156 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
0 answers
23 views

formsource only in subform field type?

So i need an XML form structure for a custom app that is used in different models. The most logical approach would be to create an external XML form file containing that structure and include it in ...
0 votes
0 answers
29 views

Submit an form with WYSIWYG Editors via AJAX

I'm submitting a standard Joomla form via AJAX. Only the apply task is submitted via AJAX: $js = ' Joomla.submitbutton = function (task) { if (task != "cancel") { if (...
1 vote
1 answer
65 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
26 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
727 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
63 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
1 answer
87 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
132 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/...
3 votes
1 answer
288 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
212 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
40 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
829 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
64 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
285 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
29 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
279 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
933 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
188 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
286 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
99 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
222 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
23 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
1k 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
930 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
132 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
158 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
36 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
55 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
819 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
618 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 ...