Filter link filed in Web form?

Hi,
I created a custom script in doctype to filter the field(linked) when this comes to the web form. How can I filter the field?