Skip to content

fa_iconpicker innerhalb von Repeater nicht möglich #13

@synoloris

Description

@synoloris

Description / Beschreibung
Der fa_iconpicker funktioniert bei statischem Inhalt fehlerfrei. Innerhalb eines dynamischen Elementes also innerhalb vom Repeater funktioniert er allerdings nicht.

Affected versions / Verwendete Versionen

System report (REDAXO 5.18.0, PHP 8.2.24, MariaDB 10.6.19)
REDAXO
Version 5.18.0
PHP
Version 8.2.24
OPcache yes
Xdebug no
Database
Version MariaDB 10.6.19
Character set utf8mb4
Server
OS FreeBSD
SAPI cgi-fcgi
Webserver Apache
Request
Browser Chrome/129.0.0.0
Protocol HTTP/2.0
HTTPS yes
Packages
backup 2.9.1
be_branding 1.8.1
be_style 3.5.0
be_style/customizer 3.5.0
be_style/redaxo 3.5.0
bloecks 4.0.2
bloecks/cutncopy 4.0.2
bloecks/dragndrop 4.0.2
cke5 6.1.0
cronjob 2.11.0
developer 3.9.2
fa_iconpicker 1.2.1
flatpickr 1.1.1
global_settings 2.8.4
install 2.12.1
mblock 3.4.13
media_manager 2.17.0
mediapool 2.15.0
metainfo 2.11.0
mform 8.0.4
mform/docs 1.1
minify 2.2.2
modulsuche 1.4.1
multiupload 2.1.3
phpmailer 2.14.0
project dev
project_manager 1.5.3
project_manager/client 1.1.0
project_manager/server 1.5.1
properties 1.3.4
quick_navigation 8.1.3
sprog 1.5.1
structure 2.17.2
structure/content 2.17.2
structure/history 2.17.0
structure_tweaks 1.4.1
url 2.1.0
users 2.11.0
yform 4.2.1
yform/email 4.2.1
yform/manager 4.2.1
yform_usability 2.1.4
yrewrite 2.10.0

REDAXO:
PHP:
Database:
Browser:
AddOns:

input.php

<?php
use FriendsOfRedaxo\MForm;

$idStatic = 1;
$idDynamic = 2;

$mformStatic = MForm::factory()

    /* --------- TAB: INHALT --------- */
    ->addTabElement('Inhalt', MForm::factory()
        ->addHTML('<h2 style="margin-top: 0;">Teasers</h2><hr>')
        ->addTextField("$idStatic.statisches_icon", ['label' => 'Fontawesome Icon', 'class' => 'rex-fa-iconpicker'])->setFull()   
        ->addRepeaterElement(2, MForm::factory()
            ->addFieldsetArea('', MForm::factory()
                ->addHTML('<h3 style="margin-top:0;">Teaser</h3><hr>')
                ->addTextField('text_header', ['label' => 'Überschrift'])->setFull()
                ->addTextField('dynamisches_icon', ['label' => 'Fontawesome Icon', 'class' => 'rex-fa-iconpicker'])->setFull()   
                ) , true, true, ['btn_text' => 'Inhalt hinzufügen', 'max' => 99, 'min' => 1]
            )        
    , true);

// Ausgabe des Formulars
echo $mformStatic->show();

image

output.php


<?php
$mformStatic = rex_var::toArray('REX_VALUE[1]');
$mformDynamic = rex_var::toArray('REX_VALUE[2]');

echo '<pre>';
print_r($mformStatic);
echo '</pre>';

echo '<pre>';
print_r($mformDynamic);
echo '</pre>';
?>

ergibt

Array
(
    [statisches_icon] => fa-calendar-days
)

Array
(
    [0] => Array
        (
            [text_header] => Beratung
        )

    [1] => Array
        (
            [text_header] => Verschleiss­­ersatzteile
        )

    [2] => Array
        (
            [text_header] => Reklamation
        )

)

Im dynamischen Inhalt ist der Key [dynamisches_icon] nirgendwo vorzufinden.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions