Closed (fixed)
Project:
Context Field
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
29 Feb 2012 at 05:51 UTC
Updated:
2 Apr 2012 at 18:10 UTC
Jump to comment: Most recent file
I tried to set a default context for a field instance, but no matter what I tried, the default never showed up as the default value in the context field. After doing some digging, I found that the default wasn't being passed into $items in the hook_field_widget_form. The default is in $instance. I created a patch that sets the default from $instance if $items is empty. Let me know if there's a better way to do this.
Cheers,
nielsonm
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | context_field-default_context_not_selected-1461028-1.patch | 761 bytes | nielsonm |
Comments
Comment #1
nielsonm commentedPatch posted.
Comment #2
nielsonm commentedComment #3
tirdadc commentedTested without the patch and then applied it. Works great, and it's committed. Also removed some old cruft on that form element. Thanks again!