1

I'm using the link module to ask the user for a link. I have disabled the link text (I.E> the text that would be inside the anchor tag) so the user wouldn't be asked for a title. What I would expect to happen is that I wouldn't see the field label, followed by the label "URL*". However, it isn't so.

As an example, my field label is Download link. What I see in the node creation form is a label like Download link* and then another label with the text URL*. Is there a way to hide the latter (the one saying URL*)?

7
  • Is this on the node/12 page that you are seeing this? If so you can go to admin/structure/types/manage/YOUR_CONTENT_TYPE/display and tell it whether or not your want labels displayed. Commented Aug 18, 2014 at 15:06
  • No, it is on the node creation form – I revised the question to point this out more clearly. Commented Aug 18, 2014 at 15:34
  • So you are getting Your label plus the "URL" default label? If this is your problem I don't believe you can fix that via the frontend configuration. You could hide it with CSS though. However, having the word URL there shouldn't really confuse anyone. Commented Aug 18, 2014 at 15:39
  • Yeah, that is my problem, since I"m not sure how much my users (they are screen reader users) can handle this. Is there a way to do this through some PHP code? I know PHP much more than Drupal. :-) Commented Aug 18, 2014 at 15:53
  • You could with php but it would still be using Drupal hook system. Do you have experience using the Drupal hooks? You could accomplish this using hook_form_alter(). Commented Aug 18, 2014 at 16:15

2 Answers 2

0

You can use hook_form_alter() to change the title of that field to an empty string.

Let me know if you need help along the way.

Good luck!

0

Look at the Manage Display tab of your content type. On that page you can set how the label is displayed:

  • Above
  • Inline
  • Hidden

and how your link displays:

  • Title, as link (default)
  • Title, as plain text
  • URL, as link
  • URL, as plain text
  • URL, absolute
  • Domain, as link
  • Short, as link with title "Link"
  • Label, as link with label as title
  • Separate title and URL
  • Hidden
1
  • Sorry, but I meant the node or content creation form; the one I get shown when I click on "Add new content". I've revised my question to make explicit mention to this fact. Commented Aug 18, 2014 at 15:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.