Questions tagged [custom-field]

With Custom Fields you can add extra information fields to Joomla's Articles and Users.

Filter by
Sorted by
Tagged with
1
vote
1answer
22 views

Render Custom Fields in Admin edit view

I want to add custom fields to my component. My admin edit view uses bootstrap tabs: <?php echo HTMLHelper::_('uitab.startTabSet', 'myTab', array('active' => 'general')); ?> <?php echo ...
0
votes
1answer
9 views

Layout override for repeatable subform custom field

I am trying to apply custom field override to my article and some of the fields I am trying to access are inside repeatable and non-repeatable subforms. Please how do I access and display subform ...
0
votes
0answers
18 views

What is the correct PHP to render Subform repeatable custom fields on the front end?

When creating custom layout overrides the PHP code <?php echo $this->item->jcfields[X]->value; ?> Works successfully, but does not function at all when it comes to repeatable subform ...
0
votes
0answers
10 views

What would keep custom fields from rendering in the frontend on Joomla 4

When using the shortcode (example {field34}) for a field in the Article editor text area the field content is not showing on the front end. I entered the fields manually and also used the dropdown and ...
2
votes
0answers
23 views

Are custom fields updatable using joomla 4 api?

Simply put when using the API to update a custom field of an article, the new information is not successfully passed through. Furthermore, the original contents are deleted from the field. The ...
0
votes
1answer
28 views

Show article fields in module

I have two custom fields in my article for longitude and latitude. I'm then trying to build a module to get these two fields from the current article displayed and show in the module. I have the ...
2
votes
1answer
26 views

Getting somehow the Article ID in an Alternate Layout for Custom Fields

I am creating an Alternate Layout of /components/com_fields/layouts/field/render.php to change the layout of some given Custom Fields. And there I need the ID of the article in order to give a unique #...
0
votes
1answer
60 views

Trying to write a custom form field that concatenates <input> and <select> values

I am a novice dabbler in Joomla PHP. I can build custom templates and simple frontend modules. I’m trying to write my first custom form field. I’ve gone over the documentation, reviewed several ...
1
vote
1answer
90 views

Use Text-Editor in UIkit Modal (Module Backend)

For a new Project i would like to have an editor instance inside a modal popup (click on an object to add / edit details). I have my Custom Field that loads an editor like so: $editor = JEditor::...
1
vote
0answers
26 views

Adding custom fields on the fly in JOOMLA 3.9

I am trying to develop a hobby project based on https://www.themealdb.com/ api. I am trying to create an article programmatically for https://www.themealdb.com/api/json/v1/1/search.php?s=Arrabiata and ...
1
vote
0answers
30 views

How to add new field types to repeatable custom field?

By default, Joomla provides few types of fields that could be used as repeatable custom fields: editor media number text textarea I want to have more fields like boolean, or maybe even more rich ...
0
votes
1answer
24 views

Registered users public listing showing only the selected fields by each user

I'm looking to display a map (google map or other) together with a list of all our registered Joomla 3.9.x users, their addresses and extra information are stored using Joomla user custom fields. What ...
0
votes
1answer
40 views

Trying to add subform field to existing component xml

I've added the following into my components XML file : <field name="activity_name" type="subform" label="Activity" description="" multiple="true&...
0
votes
1answer
33 views

Custom form field in subform. How to access parent form fields?

I have created a custom file list form field and the field is used in a repeatable subform. The purpose of this custom form field is to display a list of files in folder based on 'name' field in main ...
2
votes
0answers
45 views

How to create custom filter type option for a custom field to extend the custom fields in Joomla?

I'm trying to figure out how to add/extend the "Filter" options for a Custom Field. I first started looking to see if I could figure out where I could add my own filter to the list of ...
1
vote
1answer
96 views

Get article list based on custom field value (com_fields)

I'm trying to get all the articles from a specific category with a specific value in one of the custom fields (com_fields) I have created. I have this code: $model = JModelLegacy::getInstance('...
1
vote
3answers
136 views

Join #__content with #__fields_values then filter and sort using #__fields_values data

I wrote an override in Joomla 3.X and sorted the result from the DB using this query, which works: $query = "SELECT content.*, fieldvalues.* FROM #__content AS content, #...
1
vote
0answers
28 views

How to populate custom field dropdown with values from DB

I trying to create a new custom field, which will have a select field with menu items from certain menu type, I got stuck at populating this select field with values from database. You can see the ...
0
votes
0answers
15 views

Joomla custom fields articles list

Mimicking an old sports site that worked using cobalt with custom fields, I've managed to create a nice "match" article, but now I have two issues I don't know yet how to solve. How could I ...
0
votes
0answers
20 views

Stop display custom fields in edit article in frontend

I’m having some trouble with custom fields and tags when creating/editing an article from frontend. I’m using tags and several custom fields (grouped into five groups). By standard, the custom fields ...
2
votes
1answer
66 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
1answer
43 views

Adding extra field to joomla categories

I need help in adding extra fields to Joomla categories(not article) in my custom component categories and I didnt find any documentation for that. I want to add a time field to categories. I tried to ...
0
votes
1answer
57 views

How to display custom user profile plugin fields on "Edit account" page?

We are building a website with multiple authors using PWT ACL to restrict their access to the users tab so that they don't mess with each other's profile or content. I created a custom user profile ...
1
vote
1answer
55 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 ...
0
votes
0answers
50 views

Own Custom Field Plugin - Multiple Inputs

I am currently creating a custom field plugin for Joomla! I am now faced with the task / problem that the user needs more than just one field when adding the information. In detail it is so that it is ...
1
vote
0answers
68 views

Showon field attribute targeting field from a group to root

So this is an example XML: <form> <fieldset> <field name="field1" type="text" default="" label="" description=""> ...
1
vote
1answer
98 views

Custom field type with showon attribute for list options

When creating a showon attribute in list options one can do that in form XML since Joomla 3.9 like this: <field name="fieldx" type="list" default="0" label="...
0
votes
1answer
63 views

How can I create my own custom field?

I know how to create a custom form field if I am building a module/component/plugin but how do I build one of the Joomla! custom fields? I can't find a tutorial and I think I'm probably Googling the ...
1
vote
1answer
218 views

Using form XML for custom filter and removing group definition

I'm creating a small component with a search module. I will dumb this example down so that the question will be clear. The component manages books. The book form XML looks like this and its structure ...
1
vote
1answer
90 views

Error JLIB_APPLICATION_ERROR_INVALID_CONTROLLER from CLI on Joomla 3.7

I have an issue with a cli php script that I'm trying to execute. I want to add an article with custom fields. The part where I add articles is working well, but when I add the code to load the ...
3
votes
0answers
123 views

Joomla 4 template namespace

I'm working with latest Joomla 4 beta, and wondering how can I use namespaces with templates so I can start using and developing custom fields for my templates. I need to know what should I set in the ...
0
votes
2answers
81 views

Using isset or is not set PHP variable with extra fields?

I have an issue with setting up variables - if the custom field is filled then it should be shown, if it's empty - then date (+1 month from today's date) is shown. However, it doesn't work properly. ...
0
votes
1answer
49 views

joomla returning invalid fields for user registration

I've added in custom fields for joomla registration, however it's returning them as Invalid Fields? $requestData = $this->input->post->get('jform', array(), 'array'); echo '<pre>';...
0
votes
1answer
169 views

Insert custom field into modules .xml file

I have currently created a Joomla Module, and i would like to make it a bit more advanced now. I have created a Custom field, and i have tried to add it to the mod_NAMEOFMODULE.xml file. To use it ...
1
vote
1answer
122 views

Default options on a multi-select form field using setFieldAttribute

We got a custom jform field as below <field name="select_course" type="courselist" label="Select Course" multiple="true"> </field> Assume the ...
1
vote
2answers
191 views

Use custom fields in index.php template file

For some reason i need tu use articles custom fields in index.php file template, i try this code without success : This after defined('_JEXEC') or die('Restricted access'); JLoader::register('...
1
vote
2answers
249 views

Get values of other custom fields in field layout override

I am using a repeatable custom field for articles in Joomla! 3.9.16 with an alternative layout (override) of com_fields/layouts/field/render.php and an override of plugins/fields/repeatable/tmpl/...
1
vote
1answer
61 views

How can I call com_contact fields in an article view?

We have linked the author to com_contacts and now I want to show an author image which will be a custom field in com_contacts. I was able to show it as a com_user custom field using the following ...
1
vote
3answers
293 views

How to add the current user's user id in query of a custom field for a plugin?

If I hardwire a created_by clause in a joomla sql custom field, the query works as it should (for this specific userid the clause is, and created_by = 305): SELECT id AS value, title AS text FROM #...
0
votes
1answer
47 views

Custom Category Field

Using Joomla 3.9, although Custom Fields is now available, I am opting to do this in a plugin instead for reasons. I have created a plugin to hook into the Category view in admin, so that I can add a ...
0
votes
2answers
150 views

Access repeatable subform fields and display in article override

I have been testing the following code to retrieve and output the values from a repeatable subform field with no success. JLoader::register('FieldsHelper', JPATH_ADMINISTRATOR . '/components/...
1
vote
1answer
251 views

Custom field in menu item

I am trying to get a custom field type into the menu. I want this to be a dropdown which I poulate with some php code. Where the arrow points in want my dropdown field. So I created in /components/...
0
votes
1answer
69 views

Custom fields published state not working as expected

I am using the following code to check to see if my repeatable custom field's state is published/unpublished. If the state is set to 0, the code in between should be hidden, but instead an error is ...
2
votes
1answer
201 views

Override output for repeatable custom fields

I am struggling to find a way to output the values from a repeatable field in Joomla 3.9.15. I am currently accessing the custom fields assigned to articles using the following code: JHtml::...
1
vote
0answers
257 views

How do I sort articles in category blog using a custom field value?

I have created a custom field date and added content to the articles of a category. How can I now sort the articles in the category blog overview by this field? What should a blog.php and blog_item....
0
votes
1answer
42 views

How to use 'showon' with global settings in menu item parameter?

In a custom component I have some component params (config.xml) and I have some menu item params (default.xml). Inside the component params I make use of the showon attribute many times. But to keep ...
1
vote
1answer
66 views

Custom fields not for all usergroups

I'm triing to use custom fields in users for personal details on members of a group, but I've got some "system" users that don't have these details. But everytime I want to edit these users I'm nagged ...
0
votes
1answer
163 views

enable Selected option for a custom field extending JFormFieldList

I am creating a custom field extending JFormFieldList as below Form field is defined as below <field name="reltype_rev_id" multiple="true" type="customfield" ...
0
votes
1answer
199 views

how to add custom field type to user core component?

I need to integrate a custom field in the user component of joomla core that allows me to list some data in a select, I get this data from an endpoint, and because this type of field does not exist ...
1
vote
1answer
236 views

How to programmatically write Joomla article customs field values?

I added some custom fields to the articles of my Joomla website: I work on a custom Joomla module that creates new articles programmatically using the below code: static function createArticle(...