I may be doing this wrong but:
In one of my content types, I want people to be able to select an existing node, so I can use some of the data from the existing node of content type "page".
I've installed Entity Reference. This works great but for the fact that I can only choose to show in a dropdown every page node, which in this case means a dropdown with nearly a thousand options, when really I want people to choose from a more limited section of options (e.g. where field1 = foo and field2 = bar etc). Especially as you can only see the Title of the node, which in some cases is repeated in irrelevant nodes.
I've looked at Entity Reference View Widget, which allows you to create a View, but the output isn't ideal (e.g. it's not a dropdown, but lists every filtered option with a checkbox, whereas I definitely want people to only choose one option).
Is there another module/better way/hook etc, which would allow me to filter further the Entities in the dropdown, more than just by Content Type?
I dont think entity reference or any other module does that. You'll have to create a module for that and it will be great if you can contribute that too. You might well need to create patches in entityreference module.
On Tue, Jan 17, 2012 at 3:54 AM, DTH david@hartster.org wrote:
I may be doing this wrong but:
In one of my content types, I want people to be able to select an existing node, so I can use some of the data from the existing node of content type "page".
I've installed Entity Reference. This works great but for the fact that I can only choose to show in a dropdown every page node, which in this case means a dropdown with nearly a thousand options, when really I want people to choose from a more limited section of options (e.g. where field1 = foo and field2 = bar etc). Especially as you can only see the Title of the node, which in some cases is repeated in irrelevant nodes.
I've looked at Entity Reference View Widget, which allows you to create a View, but the output isn't ideal (e.g. it's not a dropdown, but lists every filtered option with a checkbox, whereas I definitely want people to only choose one option).
Is there another module/better way/hook etc, which would allow me to filter further the Entities in the dropdown, more than just by Content Type? -- [ Drupal support list | http://lists.drupal.org/ ]
I believe you should use form alter to change the content in the drop down provided by the entity api. make sure that the values for every option is same, as it would save the NID value in its tables. when you do node view as well, you can alter the values via nodeapi.
On Tue, Jan 17, 2012 at 3:54 AM, DTH david@hartster.org wrote:
I may be doing this wrong but:
In one of my content types, I want people to be able to select an existing node, so I can use some of the data from the existing node of content type "page".
I've installed Entity Reference. This works great but for the fact that I can only choose to show in a dropdown every page node, which in this case means a dropdown with nearly a thousand options, when really I want people to choose from a more limited section of options (e.g. where field1 = foo and field2 = bar etc). Especially as you can only see the Title of the node, which in some cases is repeated in irrelevant nodes.
I've looked at Entity Reference View Widget, which allows you to create a View, but the output isn't ideal (e.g. it's not a dropdown, but lists every filtered option with a checkbox, whereas I definitely want people to only choose one option).
Is there another module/better way/hook etc, which would allow me to filter further the Entities in the dropdown, more than just by Content Type? -- [ Drupal support list | http://lists.drupal.org/ ]
The question if the values are dynamic or static. The other approach we have used to fetch and store values when the node is created.
-Steve On Jan 16, 2012 9:12 PM, "Vaibhav Jain" in.vaibhavjain@gmail.com wrote:
I believe you should use form alter to change the content in the drop down provided by the entity api. make sure that the values for every option is same, as it would save the NID value in its tables. when you do node view as well, you can alter the values via nodeapi.
On Tue, Jan 17, 2012 at 3:54 AM, DTH david@hartster.org wrote:
I may be doing this wrong but:
In one of my content types, I want people to be able to select an existing node, so I can use some of the data from the existing node of content type "page".
I've installed Entity Reference. This works great but for the fact that I can only choose to show in a dropdown every page node, which in this case means a dropdown with nearly a thousand options, when really I want people to choose from a more limited section of options (e.g. where field1 = foo and field2 = bar etc). Especially as you can only see the Title of the node, which in some cases is repeated in irrelevant nodes.
I've looked at Entity Reference View Widget, which allows you to create a View, but the output isn't ideal (e.g. it's not a dropdown, but lists every filtered option with a checkbox, whereas I definitely want people to only choose one option).
Is there another module/better way/hook etc, which would allow me to filter further the Entities in the dropdown, more than just by Content Type? -- [ Drupal support list | http://lists.drupal.org/ ]
-- Regards, Vaibhav Jain
-- [ Drupal support list | http://lists.drupal.org/ ]