How to get varchar type input from users on my website?
Use the Custom Formatters module

Consider using the Custom Formatters module, which is very easy to use and configure. And it integrates with various other modules.

Here is an excerpt from its project page:


  ... allows users to easily create custom Field Formatters without the need to write a custom module.
  
  
  Pluggable editor/renderer engines:
  
  
  Formatter preset: Create simple formatters from existing formatters with preset formatter settings.
  HTML + Tokens: A HTML based editor with Token support.
  PHP: A PHP based editor with support for multiple fields and multiple values.
  Twig: A Twig based editor provided by the Twig filter module.
  
  Supports for all fieldable entities, including but not limited to:
  
  
  Drupal core - Comment, Node, Taxonomy term and User entities.
  Field collection module - Field-collection item entity.
  Media module - Media entity.
  
  


The Community Documentation for this module seems to only be a placefholder for now (which is also where the Read documentation links to on the module's Project page).

However there are a few other resources about it that are worth checking out:


Custom Formatters for Easy Drupal Embeds for a tutorial about using this module.
Video about What's new in Custom Formatters 7.x-2.1/2.2.


Create your custom module

Here are some tutorials about how to solve your question using a custom module (all for D7):


Create a custom field formatter in Drupal 7
Creating Custom Formatters with the Field API.
Creating new field formatters in Drupal 7.
Field API - Creating your own field formatters.