Questions tagged [jform]

Form Class for the Joomla Platform.

Filter by
Sorted by
Tagged with
1
vote
2answers
120 views

Joomla 3.4 custom fields names strange behavior in JForm

I'm working for FE component with form to make ability to user set some values to filter data from DB (ex: select, text). After user make submit these fields need to show values user have selected ...
2
votes
2answers
1k views

How do I remove and/or change the 'name' field in the registration form so that I can ask for first and last name separately?

I've developed a plugin that allows me to create a custom user profile. It works and I'm able to add/remove fields as necessary. The issue I'm facing is: How do I remove and/or change the 'name' ...
1
vote
1answer
637 views

How to set the form validation only for the fields that are shown

In the admin side I have a XML form with 2 fields as below. Both the fields are marked as required=true <field name="field1" type="text" label="Field1" required="true"/> <field name="...
1
vote
1answer
377 views

Form Validation - Server Side vs Client Side

Just got confused by seeing both type of validations in Joomla. So far my understanding of these 2 is as below Client Side Validation Done via jQuery/Javascript on the client browser Server Side ...
2
votes
1answer
2k views

Loading the options of a select form field via jQuery Ajax

Basically I am trying to load a front-end form select field via jQuery AJAX. The XML form field is <field name="student_ids" type="list" required="true" label="Select Students" multiple="...
2
votes
1answer
859 views

Using JHtml::_('behavior.formvalidator') in JForm gives empty error messages

I'm using Joomla! 3.4 core form validation and it seems to fire perfectly, but the error messages added to the alert are blank, hence I cannot see what the error is. What am I doing wrong? Here is ...
2
votes
3answers
1k views

Height and Width are not considered for an editor Form Field

The XML code I have for the editor form field as <field name="note_desc" type="editor" filter="safehtml" label="Description" required="true" height="150" /> Irrespective of the ...
3
votes
2answers
508 views

Passing Arguments for custom field

I need a custom field which has to select the database with some conditions. When customer A logged in this field has to select records belong to customer A only. The custom field is as below ...
0
votes
2answers
166 views

Form field type structure

In a Joomla 3.x plugin I need to create several new form field type and in some cases extend already existing core form fields. I know how to do it, but I have some doubts how to structure this files ...
3
votes
1answer
486 views

How to retrieve active filter from a custom field form?

Having followed the excellent explanation for How to create a view with filters and pagination, I have a custom field that filters for the most part. As it is, the code in the custom field is ...
1
vote
1answer
749 views

JForm showon attribute does not work in admin site

I have a form field which needs to be shown depending on value selected for another field. For example <field name="field1" type="list" label="LABEL1" description="DESC1" filter="intval" size="1" ...
3
votes
2answers
575 views

Adding Custom Fields to Article Component [Not in attribs field]

I am trying to save some additional fields into the Article Content and there has been a few questions like this relating to this issue but all of the solutions seem to point to saving the extra field ...
3
votes
4answers
3k views

JForm in modal window

I create a modal window when clicking on a custom toolbar button, like I was explained here and now the doubt I have is on how to create the JForm for this modal window, because they should submit ...
3
votes
1answer
88 views

Joomla - PHP+$this wrapped in Javascript.

Here is script I have. I'm trying to load it after page display. I'm trying to execute PHP code from javascript. What I need is to get email address of user who submitted the form at the textbox ...
0
votes
1answer
135 views

Component's configuration: Save multiple values

I would like to do this in my config.xml of my component: <field name="allowedfiletypes" type="list" multiple="true" label="...
1
vote
1answer
342 views

Joomla JForm SQL-Field: Get condition from global configuration

i got the following field in my form.xml-definition: <field name="attachedto" type="sql" label="COM_BESTIA_FIELD_ATTACHEDTO" query="SELECT id, title FROM #...
2
votes
1answer
543 views

How to get the JformFieldList Value by ID

I created a custom field as below class JFormFieldPaddyStatus extends JFormFieldList { protected $type = 'paddystatus'; public function getOptions($id='') { $options = array(); $...
3
votes
2answers
456 views

Save Dynamic Array of textboxes

I have developed a code to create dynamic textboxes on click of "Add" button using javascript - Javascript function GetDynamicTextBox(value,index) { return '<input type="text" name="...
0
votes
1answer
363 views

Joomla JForm showon

I would like to extend the functionality of my form I'm using in my admin-backend. To to that I would like to use the showon-attribute, which should only show a field, if the value of this field is -...
1
vote
1answer
420 views

Let JForm-Fields be dependent on eachother

I would like to solve this problem: I got some Fields in my Form. Some are Combo-Boxes, Radio Buttons, Text-Inputs and so on. Now I would like to do the following: If Radio-Button 1 has value 1, ...
1
vote
1answer
425 views

Two left joins and multiple parents for a single record

This issue is extending of the question(s) by the link joomla.stackexchange.com/a/9836/4042 but with condition when child record has not only ONE parent (parent record) but MANY. With two left joins ...
2
votes
1answer
1k views

AJAX Custom Component - Post data from Editor field

I'm struggling to post data from "editor" form field. When I do it without ajax it shows the value while, with AJAX it just make it blank. Array ( [subject] => asdasdasdasd [description] => [...
0
votes
2answers
762 views

JSON-DATA: Display input in the com_ back-end and save data in the DB

I'm developing my custom component for storing some records in the DB. In my #__records DB table there is the column attribs where I want to store some data in json-format like: {"field1":"value1","...
5
votes
1answer
2k views

How to show a search box inside a list form field

How to show a search box inside a 'list' type of form field?
1
vote
2answers
626 views

Dynamically change the “readonly”-tag of JForm Field

I got a JForm and I got some fields in there. I would like to disable a field, if the value of another field is "0". I know that I can do that by preparing the form while loading, but I want to solve ...
1
vote
2answers
586 views

Filter form field values by language

I have a specific requirement of showing categories of selected menu language only. So in my component, I have the field declared as below. <field name="catid" type="categoryedit" label="JCATEGORY"...
1
vote
3answers
665 views

getUserState() return array where as getItem() return JObject

I am facing a problem with the function loadFormData where there is check whether to pull data from the session or from the table. protected function loadFormData() { // Check the session for ...
0
votes
1answer
165 views

Joomla Form - Retrieve Values based on ID (Front End)

I'm using jform and joomla's core features of dealing with forms. i.e. Using XML as forms then storing it with JTable etc. My custom component has to deal with CRUD operation strictly at front-end. ...
2
votes
1answer
2k views

Load a Single Admin view with multiple tables and forms

We have 2 tables that have data and we need to bring data from both the tables and show in one single view. We have one single XML file which holds the fields of both the tables. The function '...
1
vote
2answers
732 views

How to set custom input data in Model

I'm using JTable for CRUD on my application. I've created method in model to save data in database I need to add custom inputs "created" and "created_by" as shown in "$custom_data" variable and save ...
2
votes
1answer
958 views

Set New XML attribute in custom JFormField

Hi I'm looking to add new field attribute for my custom component. <field type="myfield" mycustomattribute="somevalue" /> Then, I would like to render it in my HTML. Could someone help with it?...
0
votes
4answers
627 views

Remove form fieldset

I am trying to remove a fieldset from a form. I have not found a function that does this, so I do it through an array to remove them individually. $infofield = $form->getFieldset('company'); ...
4
votes
2answers
994 views

Building Component - Replace “Invalid Field: My Field” with Custom Message

I am developing Custom Component for Joomla. I did well in validating field by adding custom rule. But if entered value does not pass through my validation, it gives error as "Invalid Field: My Field ...
2
votes
2answers
1k views

Array of form fields

I am trying to load a array of form fields as below. grade.xml <field name="gralev_code[]" type="text" class="width20" label="JSCH_GRALEV_CODE" /> default.php $this->form->...
1
vote
2answers
711 views

3.x form array?

Is there a way to have the same field in an array when posting the data? Since I need the tabs in my component to be generated dynamically depending on the querys output, I can't enter them ...
6
votes
1answer
695 views

Custom XML attributes not showing in HTML markup

Here is the XML for a particular form field: <field type="text" name="first-name" id="first-name" label="MOD_LABEL_FIRST_NAME" required="required" maxlength="27" color="yellow" /> My ...
1
vote
1answer
2k views

Dynamically add fields to component's menu edit form

I am looking to add parameters to the edit-view of my component's menu editor on the fly instead of statically defining them as you normally would (as described : https://docs.joomla.org/J3.x:...
2
votes
1answer
251 views

Joomla list formfield stays empty on runtime load

I face the problem, that I have list formfield, where no values have been set in the xml formfield description. The values for the listfield will be created on runtime via jquery. When I choose a ...
3
votes
1answer
151 views

JFormFieldRepeatable—can store only one row

I am trying to use the »repeatable« form field. Right now I have this in code in the templateDetails.xml <config> <fields name="params"> <fieldset name="advanced"> ...
11
votes
1answer
6k views

What are possible filters in Joomla form fields?

I see intermittent use of filter="safehtml" and filter="string" throught Joomla forms. Is there a complete list, and can custom filters be created?
1
vote
1answer
110 views

How do I pass the generated form together with the custom fields to model class?

I have this code here, which I modified in the getForm function from my Model Class: $elementHeader=' <fieldset name="reportFilters">'; $elementName = $elementHeader; $form ...
3
votes
1answer
896 views

How to bookmark articles to user profile?

We are developing a Joomla site where different types of articles will be posted and the users will bookmark the article to their user account and display it in their user profile. If there is a ...
2
votes
2answers
1k views

How to access a specific fieldset in a form in my model class?

I am using the code below for getting form values: $data = JFactory::getApplication()->input->get('jform', array(), 'array'); However, when I use json_encode, it encodes all the form fields I ...
1
vote
1answer
192 views

Accessing Form fields in the Model

I was able to get and set values of my custom form fields by using $form->getValue and $form->setValue in my previous issue here: How to access / modify custom form fields values However, I am only ...
3
votes
1answer
642 views

How to add jQuery functionality in the backend of a module?

I'm making a module where the user can select some manufacturers names from the backend and the names will be posted in the index with some nice css. I want to ask if I can add some jquery in the ...
10
votes
1answer
2k views

How can I dynamically generate a form's XML from PHP?

I have a requirement to generate a page/form based on the user's list of items. As is, the user can specify a list of items that have a text description of the item, and whether it's a text or list ...
9
votes
2answers
1k views

How can I override the class or readonly attribute that is specified in the form xml?

We have a particular field that can only allow input when adding the record for the first time, so I'm wondering if it is possible to add a class, or specify readonly at some point after the form has ...
4
votes
3answers
2k views

JForm::setField/s - Add field to fieldset

So I'm trying to get my head around the creation of fields on the fly using JForm::setField. But as usual there is no documentation explaining how to use this method only the very minimal API ...
3
votes
1answer
940 views

Store multiple form fields as JSON string

I'm trying to store multiple field values in a JSON string in my component but I'm not quite sure how to go about it. I've done some research and it seems that using the load and bind JTable methods ...
2
votes
1answer
292 views

Joomla 3 Flexicontent custom form based on jForm

After hours of googling and experimenting, I gave up :( I need to add form to my articles in Joomla 3, that collects data from article's additional fields and emails them. Articles are managed by ...