Form "Show Related Data" Links show List name

Status
Not open for further replies.

jcc

Member
Rob helped me with the edits he made yesterday in this thread - http://fabrikar.com/forums/showthread.php?t=27898. I am still running the version as it was modified on the system. The site was running version github Fabrik-fabrik-3.0.6.1-8-g526c8bf until then.

Now I can get to the Form without error, but the Related Data links are showing the List names rather than Heading Text entered in the related data area. In fact, it is grouping the the List and Form links because they are on the same table; the '(6) View' heading for Account Event should say 'Payment History' and the '+ Add' heading should be 'New Payment'. See first image. Second image shows how the same links look on the List.
 

Attachments

  • related data3.JPG
    related data3.JPG
    12.2 KB · Views: 228
  • related data4.JPG
    related data4.JPG
    13 KB · Views: 227
I've arrived safely in England, but have been travelling around pretty much non stop since I got here, catching up with friends and family I haven't seen in 20 years (this is only my second trip home since '92). Keep bumping, I'll get to it as soon as I have some down time from travelling.

-- hugh
 
Seeing as it was me that added the incorrect label, I decided to fix my mistake - we now use the related data -> Form -> heading string as the label.
Changes are in github

-Rob
 
I just tested this code change with the latest github (Fabrik-fabrik-3.0.6.3-31-g385d22c) and I'm not entirely sure that this is quite complete. On the form, I am now getting the related data -> Form -> heading string as the label for the LISTS (related data -> Lists), but I don't get any label for the FORMS (related data -> Forms).

I have heading text entered in both the related data -> Lists and related data -> Forms for the 3 related data links I have enabled (2 lists, 1 form). On my Account form, the labels display for the 2 lists, but the link to the form is missing its label. Note that is button text is correct, just the heading text is missing.
 

Attachments

  • related data6.JPG
    related data6.JPG
    16.2 KB · Views: 184
  • related data7.JPG
    related data7.JPG
    12.8 KB · Views: 190
Since I was already messing around with the form model (for thread http://fabrikar.com/forums/showthread.php?p=151250), I decided to fix the labels as well.

In components/com_fabrik/models/form.php, I made the following changes to function getRelatedTables to add the labels from the related data sections.

For the LIST links:

Code:
                                // $$$ tom - 2012-09-14 - This should be from the linkedlistheader:
                                //$label = $factedLinks->linkedformheader->$key;
                                $label = $factedLinks->linkedlistheader->$key;
                                $links[$element->list_id][] = $label . ': ' . $referringTable->viewDataLink($popUpLink, $element, null, $linkKey, $val, $count, $f);

For the FORM links:

Code:
                                                // $$$ tom 2012-09-14 - Need a label for linked forms, too.
                                                $label = $factedLinks->linkedformheader->$key;
                                                $links[$element->list_id][] = $label . ': ' . $referringTable->viewFormLink($popUpLink, $element, null, $linkKey, $val, false, $f);
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Staff online

Members online

Back
Top