I was trying to remove a link from a node and found that I couldn't. Even when I deleted the link text it gave me an error saying I needed to enter something in the URL field. Would it be possible to add a remove button to the edit screen once a link has been added? Something similar to the file upload field?


jcfiala’s picture

No, probably not. It's only complaining about needing to enter something in the URL field because of the settings on the field - one of these is probably true:

1) You've got the field on that node type set to required.
2) You've set the field up so that it requires a url if there's a title, and you didn't blank out the title also.

I suspect #1 is the correct answer. If you stop the field from being required, you'll be fine.

bmango’s picture

Thanks very much for the reply. I thought it was strange that I couldn't remove it. I'll try your suggestions. Thanks again.

kennywyland’s picture

Please don't dismiss this request. I would like the Remove button as well. I don't have my Link field set to Required, but if I've got 5 urls in a Link field, I have no way to delete them.

Emptying out all 5 of those values doesn't remove the values, it just makes the field have 5 empty values. That means the node behaves as if it has 5 Link values instead of 0.


mrfelton’s picture

Version:6.x-2.9» 7.x-1.x-dev

I think this is a valid feature request. It would be a big + for usability. Bumping to 7.x

jenlampton’s picture

Issue summary:View changes

I would also like a remove button, for the reason specified in #3.

I've stumbled across three different modules that are all trying to solve this UI deficiency for fields in general:
* the multiple_fields_remove_button module
* the cck_multiple_field_remove module
* the field_remove_item

Maybe one of these will help someone else who finds this issue.

dsdeiz’s picture

Emptying the field works as expected now. I don't think a "Remove" button is still necessary.

heylookalive’s picture

In addition to the comments in post 3, I consider this a UX fail as a remove button per item makes it clear as to how to remove an item. Blanking fields out is obscure and not intuitive.

jcfiala’s picture

Well, what field modules do provide a blanking button?

"Blanking fields out is obscure and not intuitive."

It seems to be the way that fields are constructed in core, and I tend to be willing to follow them as an example. That being said, I'd be willing to review a patch if someone wants to create one.

How is this issue handled in Drupal 8, by the way?

MrPaulDriver’s picture

Well, what field modules do provide a blanking button?

File - for one.

Ordinary folk don't get it, that they have to blank out the text. A remove button is very necessary.

heylookalive’s picture

@jcfiala Core does many things :) I can't say that this is a priority for me in terms of patching, but will help however else I can (reviewing or whatever).

dsdeiz’s picture

Assigned:Unassigned» dsdeiz

I'll try my hands on this. I took a look at the options from the existing modules posted at #5. multiple_fields_remove_button provides a really good UX since it adds a 'Remove' button on each item in the form. I'll try to borrow some code there and see if I can get it to work.