Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Is it possible to do something like prepopulate with popups api add and reference?
We have a piece of content we want to collect where we would like a couple taxonomy fields to be filled in.
Haven't even tried yet, just seeing if anyone has examples or advice.
best,
ben, agaric
Comment | File | Size | Author |
---|---|---|---|
#6 | 575992-popups_reference_share_taxonomy.patch | 8.18 KB | greg.harvey |
#4 | 575992-popups_reference_share_taxonomy.patch | 6.41 KB | greg.harvey |
Comments
Comment #1
tpainton CreditAttribution: tpainton commentedAny luck with this? I want to do the same thing. Have no idea how to use prepopulate with this and since I can't get to the url, not sure I can. One option I have not tried yet is to see if nodereference_url would work or be modifiable??
This would be a great feature.
Comment #2
greg.harveyMe too - will take a look.
Comment #3
greg.harveyI suspect a good approach will be to save the current data in a cookie with JavaScript when the Add link is clicked and then use it in a 'prepare' op in hook_nodeapi() for the target content type.
Comment #4
greg.harveyOk, here's an experimental patch which adds the ability to pass taxonomy to child (referenced) nodes. After applying, please check the README. Instructions are important. It depends on jquery_plugin and the Jookie plugin for saving the taxonomy data in a cookie via JavaScript.
It works for me, but it's against the 6.x-1.x branch.
Comment #5
greg.harveyActually, this seemed to work for me at first, but it's not working now! I'll have to revisit later in the week. Will post a new patch when I get it working reliably. Probably on Friday.
Comment #6
greg.harveyNew patch attached. It still needs work, but it does all my client needs. It's a good starting point, so setting to needs review. After applying the patch, please see the updated README for the todo list and other bits. Feedback needed, help required to finish this.
Comment #7
montesde CreditAttribution: montesde commentedI need this functionality too but to prepopulate nodereference fields. If we had the ability to make custom node/add URLS or be able to add some queries or anchors to the end of url, it would make this more flexible.
I'm trying to make a popup node reference field that autopopulates the node that is added and then fills in the original field while using the prepopulate module.
- John