Custom Links in Repeatable Joined Group

darkreign

Member
Hello, I?m trying to create Custom Links for child records in a repeatable group in a form, to allow editing/viewing in another form. I?ve created a ?Custom Link? as follows:

odano.ca/index.php/members/files/form/41/{da_file___da_file_id_raw}

but in the generated URL, the placeholder is replaced with ALL child record ID?s, for example as follows:

odano.ca/index.php/members/files/details/41/1,4,7 (where ?1,4,7? are the IDs of the three child records).

As a result, only the 1st record (ID #1) shows up in the form, no matter which child record I click on. Doesn?t matter if I remove the ?_raw? at the end of the placeholder either.

I think it is similar to the issue described here but in this thread the issue was resolved, so I?m not sure if the same bug recurred or this is a new bug or I?m doing something wrong:

fabrikar.com/forums/index.php?threads/element-custom-link-on-repeated-group.15727/page-2
(sorry have to remove the hyperlink portion because forum won't let me post links at the moment)

Thanks in advance!
Karim

Fabrik 3.3.1
Joomla 3.4
 
This was using the Element's "List View Settings" Custom link. I didn't think about using the List's settings, but I just tried it and no effect when viewing the list as a joined group.
 
Thank you! That workaround did help!

I also added the icon-pencil Font Icon so it looks exactly like the native Fabrik edit button. For reference, here is what I used in the Calculation field:

$rowid = '{da_file___da_file_id_raw}';
return '<a href="index.php/members/files/form/41/' . $rowid. '" class="icon-pencil"></a>';
 
Strange, when I use an element's custom detail link on a field in the repeat group, using the repeat group's id_raw, I get the right id for each repeat.

http://screencast.com/t/2m46o0nc

I'm not actually building a valid URL, just a junk link, but you can see bottom left when I hover on the link that it's getting the right single ID appended.

-- hugh
 
Hmmm, well, I guess you can't see 'cos the bottom got chopped off the screencast. So you'll just have to trust me, lol.

-- hugh
 
I could see the bottom of your screencast =) and saw that the IDs were distinct for each file...not sure why mine is different, but thanks for looking into it!
 
I want to fix it, but it's hard to fix something I can't seem to break.

It could be to do with what other element types you are using, or what plugins are running on the form. There are still a few little issues lurking in the way the input data gets formatted during certain operations. I have a gut feeling about where it may be happening, but still can't nail it down.

-- hugh
 
Thanks for following up. After your post, thought I would try to see if I can pinpoint when it starts to occur because its becoming a hassle now, having to create extra calc fields for most of my tables....I created 2 dummy test tables using the same connection but completely independent of my other tables, and left joined one to the other, created a new record in Form for the master table, and then added 3 child records, and found the error occurred right away, before changing any other settings.

I just re-watched your screencast...so when I am looking at my Master Table list, the links do work properly just as in your screencast...the issue seems to be when looking at a record from a Master table in Detail/Form view, with its joined repeatable elements at the bottom of the form. I've attached screenshots of the generated URLs generated in List mode vs Detail mode (combined both screenshots into one file, with top = list view, and bottom = detail view).
 

Attachments

  • repetablelementsissue.jpg
    repetablelementsissue.jpg
    126.7 KB · Views: 250
I'd like to bump this up in hopes that you can find the issue and resolve it. I thought I found a workaround using the Calc field but then I ran into the problem where the ID isn't incorporated into the calc because the ID isn't really available until after the form is submitted to the mysql table, so then I have to create another workaround for that...it's just too many workarounds to deal with this issue. Could you read my previous post and see if you are seeing the issue in the form view like I am?

Thanks
Karim
 
I'm still working on this one, btw. Got some changes in my local code I'm testing for a while before I commit.

-- hugh
 
Double plus w00t!

OK, so we now have a parseMessageForRepeats(), which handles the "only use this $repeatCounter instance of placeholder data for elements in the same group as me" thing on elements. So far I've only added it to this (custo link) code, and the upload element code that handles placeholders in the upload path. There's a few other places I know needs it, like the calc element.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top