I wanted to do something but have forgotten.
Is this sentence valid? Can I use the past simple with the present perfect in this case?
As another example:
I have wanted to buy something but have forgotten what.
If I were you, I would say "I wanted to do something but I forgot" to be safe, but I'm not sure if we can say your way :-)