Skip to content

Upgrade from Kdyby\FormsReplicator 1.x #112

@JanK007

Description

@JanK007

Hello everybody,

I was tasked with upgrading an old application written in PHP 5.6 and Nette 2.3 to PHP 8.1+. I gradually replaced individual libraries and got to PHP 8.1, Nette 3.1 (unfortunately to Nette\Utils 4) but stayed at Latte 2. Unfortunately Nette\Utils 4 blocks me from using the old Kdyby\FormsReplicator.
I found the Contributte\Forms-multiplier library. Unfortunately, due to using Latte 2, I cannot use a higher version of the library than 3.2. In this version, I tried the default examples that worked me, but I ran into a few problems in the application that I can't quite get around:

  1. when setting default values ​​to the replicator when rendering the form, the defined buttons do not see it:
    Multiplier->detachCreateButtons(): void
    Nette\InvalidArgumentException: Component with name 'multiplier_creator' does not exist
    (apparently they are not yet added to the appropriate container)

  2. I did not manage to define nested multipliers (multiplier in multiplier) even in the test case, which it used several times in that application

  3. custom rendering (not through the macros) of repeatable components within the template is not working for me

Can Contributte\Forms-multiplier in version 3.2 even solve these problems?
Would switching to Latte 3 and thus the possibility of upgrading the library to version 4.* help me? Can a newer version of the library address these issues?
Should I use some other library?
Any other advices or examples?

I will be very grateful for any good advice.
Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Triage: Next

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions