You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I needed to use a FilteredDropdownSet, but the label in the dependent dropdown box came from a method (e.g., getFullName()) instead of a single database field. This required a small modification to the FilteredDropdownSet. I think that this might be useful for others too.
The change is too small for me to bother forking the project and sending a pull request, so here's the patch:
I needed to use a FilteredDropdownSet, but the label in the dependent dropdown box came from a method (e.g., getFullName()) instead of a single database field. This required a small modification to the FilteredDropdownSet. I think that this might be useful for others too.
The change is too small for me to bother forking the project and sending a pull request, so here's the patch:
code/dropdown_fields/FilteredDropdownSet.php | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/code/dropdown_fields/FilteredDropdownSet.php b/code/dropdown_fields/FilteredDropdownSet.php
index 09da7dd..64267e6 100755
--- a/code/dropdown_fields/FilteredDropdownSet.php
+++ b/code/dropdown_fields/FilteredDropdownSet.php
@@ -52,7 +52,9 @@ class FilteredDropdownSet extends FieldGroup {
$results = DataObject::get($this->sourceClass, $filter);
if($results) {
foreach($results as $r) {
1.7.7.GIT
The text was updated successfully, but these errors were encountered: