• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

Dropdown element default value when using copy list plugin

vallottoni

New Member
Hi,
I encounter two problems with the "copy list" plugin.
Would you have a solution ?

1) When the user click on the "copy" button next to a row in my list, I would like him to access the editon form, where fews elements are filled with the values of the copied row. What have I do to not just copy the row, but directly open the row in my edition form ?

2) In the copied row, there is a dropdown element to be filled with its default value rather than with the value present in the copied row. If I set the option "default on copy" to "yes" in the "Access" tab of my element settings, the saved value is not the default value of my dropdown, but "NULL". Any idea to save the first value of my dropdown element on copying a row ?
Thanks for your help!
My best.
 
Sounds to me as if you don't want to "copy" rows but rather let users "add" new rows instead.
1) It would lead users automatically to the form for a new row.
2) There you could have elements pre-set to certain default values just as you wish.
 
Hi lousyfool,
In the attached file, you can see what I want to do.
My list, show a "copy" button at the end of each row.
When the user clic on this button (1), the row is copied, but unfortunately the value of my element "Etat" is not filled with the default value. It's a dropdown element. It's default value is "Brouillon" and I've set the option "default on copy" to "yes" in the "Access" tab of the elements settings.
Any suggestion ?
 

Attachments

  • Printscreen.png
    Printscreen.png
    160.4 KB · Views: 59
I can confirm, that on copy a dbjoin value is not filled in if set to "default on copy", this seems to be a bug.

But if you open this copied record to edit, the default value is shown and stored on save.
So if the copied record has to be opened anyway for editing it should be ok after saving.
 
Thank you troester!

It's not exactly a dbjoin value, but a simple dropdown element.

I've done a lot of research in the hope of finding a solution and I'm relieved to learn that it's a bug in the component. Do you know if there is a way to report bugs so that they can be fixed in future updates?

As an alternative solution, I thought there might be an option for the "copy" button in my list to open the duplicate row in an edit form. This way, my dropdown would appear filled with the default value that would be saved in the database when the user clicks on Submit button.
Do you know if there is a simple way to achieve this?

Yours sincerely,
 
You can add a list php plugin, do the copy yourself and redirect to the form of the new record (I think a redirect is only possible if your list is not ajaxfied).
http://fabrikar.com/forums/index.php?wiki/php-common-tasks/

But strange enough now the "Default on copy" is working on my test list also for the dbjoin :confused:
(I think the only thing I've done was to add a dummy php plugin and to delete it).

BTW: your screenshot looks pretty Swiss like;)
 
Last edited:
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top