Questions tagged [jform]
Form Class for the Joomla Platform.
127
questions
16
votes
1
answer
9k
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
1
answer
121
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
1
answer
1k
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
2
answers
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
1
answer
201
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
1
answer
820
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
1
answer
3k
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
2
answers
2k
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
3
answers
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
1
answer
1k
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
1
answer
309
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
2
answers
272
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
1
answer
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
1
answer
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
1
answer
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
3
answers
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
1
answer
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
2
answers
2k
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 ...
5
votes
1
answer
3k
views
Server-side validation rule is not being found
I've added a custom field to com_content, and everything has been working wonderfully. I'm now trying to add some server side validation, and after following all the tutorials and examples I've been ...
5
votes
4
answers
6k
views
How to work with field type Checkboxes (not checkbox)
My component needs to save mulitple options, and I can't seem to get my head wrapped around how to do it. Referring to Checkboxes form field type, I'm not sure how Joomla is expecting to save the ...
3
votes
3
answers
3k
views
Filtering list of Users in User form field type
I've been unable to determine if/how the list of users can be filtered. The example below from User form field type, shows the filter in use, but I've been unable to come up with how to specify the ...
0
votes
1
answer
536
views
Multiple task with one
I am looking for a way to build multiple task with 1 layout/view
for example:
administrator/index.php?option=com_component&task=form.one
administrator/index.php?option=com_component&task=...
5
votes
3
answers
2k
views
How to save data from 2 fields as a JSON string to 1 database table field?
I need help to store data in json format in my DB like {name:'1', name2:'2'}.
So far I have this:
model/form/category.xml:
<fieldset>
<field
name="name"
type="text"
...
3
votes
1
answer
3k
views
How to get the form of component from module?
I tried to get a component form from my module. I got the model and then tried to get the form, but the result was empty. I tried to define 'JPATH_COMPONENT' and it was useless.
define('...
3
votes
4
answers
1k
views
How to retrieve unique values before a parenthesis in JFormFieldList Filter query?
I have a JHtml custom filter populated by a JFormField extended class. It is added in the view with the following code:
JHtmlSidebar::addFilter(
'- Select Height -',
'filter_height',
...
1
vote
1
answer
359
views
Adding all form parameters in a custom item of the component
I prepared a component and i have to add different categories and custom items with lots of fields in my component.But What i want is to display all the joomla's fields for adding a new item in my new ...
4
votes
3
answers
1k
views
checkboxes field type in module settings not checked by default
I want to add following form field in module settings like -
<field name="fb_posttype" type="checkboxes" label="Post types">
<option value="status" >Statuses</option>
...