• 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.

Form BUG

arie

Member
Hello
i have a list joined to another list (one to many) => donor to multi donor-addresses.
When I display a record, I should have 3 mail addresses attached to a donor but only one is displayed and those warnings are displayed:
Code:
Warning: stripslashes() expects parameter 1 to be string, array given in .../plugins/fabrik_element/internalid/internalid.php on line 44
 
Warning: stripslashes() expects parameter 1 to be string, array given in .../plugins/fabrik_element/internalid/internalid.php on line 44
 
The login I have for you doesn't seem to have backend access. I need to see how everything is configued, as I can't replicate that issue here.

-- hugh
 
Can you either make that account a super admin, or set the language to English. As you know, I'm not French.

-- hugh
 
You had "Save part-edited records" enabled, which is only relevant for multipage forms, and causes us to load data form the session, if it exists. Which usually it won't, if it isn't a multipage form, but I think you are doing some custom stuff with the session on that form/list.

I turned that setting off, everything seems OK now.

I still don't speak French, though. :)

-- hugh
 
Thanks
Sorry but I have another issue here. I've noticed that if we decide to change the Delete access level of a repeat group to special so the minimum repeat count of that group isn't 0 but 1.
That means, we are obliged to have 1 repeated group
 

Attachments

  • Capture d’écran 2015-04-22 à 00.12.21.png
    Capture d’écran 2015-04-22 à 00.12.21.png
    110.8 KB · Views: 125
Not quite sure what you mean. Are you saying if you set Delete ACL to special, even if you set min repeat to 0, it always shows and saves one group?

-- hugh
 
thats expected I would think. Min group states the minimum number of repeat groups you have to add.
The default is one group.
So setting min to 0 would still allow people to add groups.
Its not clear what you are trying to achieve, do you want the group to be only visible to admins? In that case you should use the group access option.
 
IF I set Delete ACL to special and I set min repeat to 0, it always shows minumum one group and I cannot delete it
 
erm as I said the default way a group loads is with 1 group - and setting min to 0 won't affect that. Obviosly if you set delete acl to special then it wont't let you delete that default group.
Perhaps you mean setting MAX to 0? In which case I can see that that isn't working as expected as the code treats 0 and 'none' and allows for multiple groups to be added
 
Well, no, you can set Min Repeat to 0, and have no repeats:

http://screencast.com/t/vjx6yfuwKLea

We still add one (we have to, so we have it there in the form to duplicate from), we just hide it on load. As you can see in that video, 'cos that's a very complex page, and tabbed, so the hiding happens slow enough that you see the default first group before it gets hidden. On a normal, less complex form you wouldn't see it appear then disappear.

And the big difference is, if you set it to 0 (and don't add one) then we won't create a row in the joined table. If you show the default repeat (with Min set to 1), then we will create that row in the joined table.

And I just confirmed that if you set Delete access on the group, it does indeed always show that first group, it won't hide it on load, even with Min Repeats set to 0. I have a suspicion as to why, checking it now.

-- hugh
 
Yup, it's because in the form.js duplicateGroupsToMin() method, where we either duplicate the default group X times to the "Min Repeat" number ... OR ... hide it if min repeat is 0 ... the way we hide it is ...

Code:
if (typeOf(del_btn) !== 'null') {
 
// Remove only group
del_e = new Event.Mock(del_btn, 'click');
this.deleteGroup(del_e);
}

... and of course if the user doesn't have delete access, there is no delete button ... so ... yada yada.

Not sure what to do about that, other than maybe extract the guts of deleteGroup() into something like doDeleteGroup(), which doesn't require the delete button click event.

-- hugh
 
Yup, the only reason we create that mock event using the del_btn is because in deleteGroup, we use it to get the group container:

Code:
var group = e.target.getParent('.fabrikGroup');
So I think we can indeed extract the bulk of the deleteGroup() code out in to a doDeleteGroup(group) method, which takes the group container as an arg, instead of the button click event, and call that from duplicateGroupsToMin().
-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top