Embedding links in text fields

I am trying to buld a link with text displayed within a text_field or
text_field_tag. e.g. the following text field displays an ID of 1.

<%= text_field_tag(@contact, @contact.id , {:readonly => true}) %>

I would like the 1 to also be a hyper link to allow me open and show
contact.

Effectively I am trying to do something like

<%= text_field_tag(@contact, <%= link_to @contact.id, :action =>

‘show_contact’, :id => @contact.id %> , {:readonly => true}) %>

On Mar 11, 2007, at 2:12 AM, vin wrote:

<%= text_field_tag(@contact, <%= link_to @contact.id, :action =>

‘show_contact’, :id => @contact.id %> , {:readonly => true}) %>

I don’t think you can do that. Browsers “strip” most markup from text
field contents.

– fxn