Questions tagged [jform]

Form Class for the Joomla Platform.

Filter by
Sorted by
Tagged with
3
votes
2answers
483 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
471 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
699 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
563 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
87 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
134 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
340 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
538 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
446 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
353 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
393 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
395 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
733 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
594 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
564 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
652 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
164 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
722 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
918 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
583 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
967 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
699 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
684 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
248 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
150 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"> ...
10
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
877 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
191 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
601 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
917 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
283 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 ...
1
vote
2answers
254 views

CKform Checkbox issue

I'm using Ck forms component to build my forms. Every things works fine, except checkbox, they are not like what is planned. My question is : how to align them one next to one, and how to match Value/...
2
votes
1answer
1k views

Frontend: why some fields are not in the $data param of the save function?

I'm using a frontend JForm to manipulate some data. The html form is correct, but when it is sent back to the model save function I don't receive all data. This is the data that save receives through ...
3
votes
1answer
2k views

How to style a Custom Field radio list as btn-group?

I'm trying to create a custom field which is a radio list, and must be displayed as a btn group. It works as expected when using the standard type="radio"in the XML (rating2), but when rendered as a ...
1
vote
1answer
1k views

Add onclick/onsubmit event to form submit

I have made a plugin that add few fields on joomla registration form. Now I need to add a javascript event on submit that will handle those extra fields I added, but I couldn't find any way to ...
3
votes
3answers
2k views

Overriding Core Components Model Form XML

I want to change the Field type for the Article's Links, from input text to DropDown List with internal menu items. I am looking for a convenient way to do this with the minimum work. I can't find ...
4
votes
1answer
2k views

Writing custom method to save form data

I am trying to find the preferred way to save form data using joomla API methods. I am trying to save data with an ajax-call. First i tried just calling the components standard save method, calling: ...
7
votes
2answers
1k views

How can I provide a custom message for a failed JFormRule validation?

When validating a custom field, and the test fails, Joomla returns the following default error message: **Warning** Invalid field: My Field How can I specify the message that is returned to explain ...