I think this can be called a bug but ... maybe it's a feature.

In the field setup, I'd like to be able to allow the user to choose the link target, leave the default URL blank (ready for the real URL) and "Open URL in a New Window" checked on by default.

The "Open URL in a New Window" checkbox only "sticks" if the default URL is non-blank.

Comments

tguilpain’s picture

I reproduced this on a clean install.
I added a link field to a content type and put its "Link Target" setting to "Allow the user to choose". Then, in the default settings area for this field I ticked the "Open URL in a New Window" checkbox and saved.
However, when you go create the content, the checkobx is not ticked by default as expected. It only works if a default URL has been set as well.

tguilpain’s picture

I think the problem is linked to the field api. After more tests, I found that the issue is that the form for the
default field settings does not save the option for that checkbox unless the default URL is filled in as well. But that form is generated automatically within the field settings form. I could not find something wrong within the link module's code.