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.
By jesterFortyEight on
I have a custom content type, I want to capture the URL Alias then modify this and save it as a custom field value, how can I do this?
thanks
Comments
More info
Please describe your problem in detail so that we can help you.
--
Yogesh Kushwaha
When my content type is saved
When my content type is saved I have a required value, if that value does not have a specific format i need to ensure that it is modified
user enters: this-is-my-string
I need to ensure that it is saved as
modified/this-is-my-string
Code will do exactly what you want.
Sorry for replying too late but I have solution for you. create a custom module and in custom_module.module file write a hook to do this.
Above code will do exactly what you want.
--
Yogesh Kushwaha