Home » Database » DB_DataObject_FormBuilder » Bug #5630
friendly label for crosslinks
Details
| Request #5630 | friendly label for crosslinks |
|---|---|
| Submitted | 2005-10-08 09:22 UTC |
| From | sdc at spiretech dot com |
| Assigned | justinpatrin |
| Status | Wont fix |
| Package | DB_DataObject_FormBuilder |
| PHP Version | 4.3.10 |
| OS | RH Linux |
| Roadmaps | (Not assigned) |
Comments
[2005-10-08 09:22 UTC] sdc at spiretech dot com
Description:
------------
It would be nice to have a way to define a user-friendly label for the crosslink feature.
It currently shows something like
Cross Link Table FromField ToField
I needed to shorten this up and make it easier for end users to understand, so I did the following:
1. added a 'label' key to my crosslink definition in my table class.
2. added a few lines of code to FormBuilder to make it show the appropriate label.
I've got my code modifications here, but I suspect it might need to be changed in a few more places.
If there is some other way that this is supported or I should be doing this already, let me know.
Test script:
---------------
case ($type & DB_DATAOBJECT_FORMBUILDER_CROSSLINK):
//...
$crossLink = $this->crossLinks[$key];
$groupName = $this->_sanitizeFieldName('__crossLink_'.$crossLink['table'].
'_'.$crossLink['fromField'].
'_'.$crossLink['toField']);
//new code here
$groupLabel = $crossLink['label'];
//...
// then down near the bottom of this case changed $groupName to $groupLabel
$this->_form->_addElementGroup($element, $groupLabel, $this->crossLinkSeparator);