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.
For a recent project I needed to be able to fill a CCK link field via the URL. If this would be useful to others, I can provide a (simple) patch.
Comment | File | Size | Author |
---|---|---|---|
#3 | 1154572--4476816-cck-link-support.patch | 783 bytes | helenrae |
#2 | 1154572-4457026-cck-link-support.patch | 449 bytes | helenrae |
#1 | 1154572-cck-link-support.patch | 793 bytes | helenrae |
Comments
Comment #1
helenrae CreditAttribution: helenrae commentedMy first patch. :)
Hopefully this is useful to someone.
Don't forget to run the user-submitted url parameter through drupal_urlencode() in your module.
Comment #2
helenrae CreditAttribution: helenrae commentedComment #3
helenrae CreditAttribution: helenrae commentedAhem, this version should work. Just adding this very simple bit to urlfill_get_path:
case 'link':
return array(0,'#default_value','url');
break;
Apologies for the noise.