Remove hyperlink from a view form

rss

Posted by jpwallace - Jan 30 ’17 at 08:41

Is it is possible to remove the hyperlink from a lookup field or people picker field on a view form. I set both fields to read only but these are still hyperlinked

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 5 years 10 months 28 days
    #1 by Dmitry Kozlov Jan 31 ’17 at 02:50

    Hi,

    Please, use the code:

    fd.field('FieldName').control()._el().html(fd.field('FieldName').value());

    Replace 'FieldName' with the internal name of your lookup or user field.

  • jpwallace
    Member
    Member for: 2 years 7 months 13 days
    #2 by jpwallace Jan 31 ’17 at 03:45

    [#1]: Thanks for your reply Dmitry, i have used the above code, in the forms JavaScript. The field I am using is named Departments and replaced where you advised. It is still hyperlinked when viewed in my display form?

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 5 years 10 months 28 days
    #3 by Dmitry Kozlov Jan 31 ’17 at 03:57

    [#2]: Please, send HTML-source of the form page to [email protected]

Displaying 1 to 3 of 3 messages