Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Hot answers tagged

7

This is my solution. If there's any better solution please let me know <?php foreach ($slideshow_items as $item) : ?> <div class="slideshow"> <img src="<?php echo $item->slideshow_img; ?>" /> <p class="slideshow_text"> <?php echo $item->slideshow_text; ?> </p> </div> <?php ...


4

Edited to add subform field type-specific answer: Having looked at it properly, attaching your own layout to the subform field type is super-easy. Create a layouts folder in the same parent component folder (site or admin) as the XML file, and put your layout in it: -com_myComponent - controllers - layouts - mylayout.php - models ...


3

When you need to get just one field names' value: use Joomla\Utilities\ArrayHelper; $items = ArrayHelper::getColumn((array) $params->get('subformName'), 'fieldName');


3

Sub Form Fields data save as JSON format so first need to "json_decode()" this to get the data then run foreach look to get data. <?php $slideshow_items= json_decode($this->item->slideshow_items); ?> <?php foreach ($slideshow_items as $item) : ?> <div class="slideshow"> <img src="<?php echo $item->slideshow_img; ?>" /&...


3

In your table's bind function, add this: if ( ( !empty( $array[ 'list_links_url' ] ) && ( is_array( $array[ 'list_links_url' ] ) ) ) ) { $this->_jsonEncode[] = "list_links_url"; }


2

To place a subform (Joomla! 3.6+) within another "master" form and use a custom layout: 1) In the master JForm XML file use the subform field type. <field name= "fieldname" description= "Field name description" type= "subform" label= "Field Label" required= "true" formsource= "/administrator/components/com_mycomponent/models/forms/...


2

You need to trigger the change event after changing the value of the checkbox. You can do this as follows: $(checkbox).prop("checked", true).trigger("change"); More about this here: https://forum.jquery.com/topic/should-chk-prop-checked-true-trigger-change-event


1

$repeatable_fields_map = (array)$this->params->get('repeatable_fields_map'); foreach($repeatable_fields_map as $item) { $accreditationImage = $item->accreditationImage; $accreditationText = $item->accreditationText; $link = $item->link; // do stuff with these variables }


1

I don't think this is possible out of the box. Maybe you can create your own JFormField which creates wrapper around the subform.


1

If you are using the Bootstrap Carousel. this works for me. <div id="gallery-1" class="carousel slide" data-ride="carousel"> <div class="carousel-inner" role="listbox"> <?php foreach ($slideshow_items as $item => $value) :?> <div class="item<?php echo ($item=='slideshow_items0') ? ' active': ''; ?>"> ...


1

So far this is not yet possible to do in Joomla. Nested subforms or in other words multi level subforms is on the agenda. It's just hoping a good volunteer is ready to tacke this issue. More info can be found here: https://github.com/joomla/joomla-cms/issues/11551 In the meanwhile the only possible solution is to add your own javascript and copy the values ...


1

I solved this doing it a bit different. B is done via this code which grabs all the inputs and converts them to a select box. Then when the user makes a selection it copies that selection to a normal text form field. This is the field that you load to get the results for C. When the user hasn't selected anything it shows the word character in the select box....


1

I don't recommend you to process this data with an SQL query. Its not bulletproof and you don't have a tools to validate the data. Why? You would have to work strictly on strings that can lead to broken data. Not to mention that creating and testing a proper query would take ages. Solution What I would recommend is to do it through CLI Joomla! application. ...


Only top voted, non community-wiki answers of a minimum length are eligible