# Adding quotes around a text field

**URL:** <https://www.ruby-forum.com/t/adding-quotes-around-a-text-field/101521>\
**Category:** Rails\
**Created:** [August 5, 2006, 7:10pm UTC](https://www.ruby-forum.com/t/adding-quotes-around-a-text-field/101521 "2006-08-05T19:10:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vince](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/b5e925/32.png) [@vince](https://www.ruby-forum.com/u/vince)\
**Post date:** [August 5, 2006, 7:10pm UTC](https://www.ruby-forum.com/t/adding-quotes-around-a-text-field/101521/1 "2006-08-05T19:10:56Z")

</div>

I have a text field where people enter tags and click a button to  
submit. Some of the users are entering multiple tags accidentally (i.e.  
‘really’ and ‘cool’ instead of ‘really cool’) so I’d like to alter my  
code so it automagically adds quotes on either side of whatever they  
submit. I haven’t the foggiest idea where to start… Here is the code  
I’m working with:

\<%= start\_form\_tag :controller =\>‘stores’, :action =\> ‘updatetags’ %\>  
\<%= text\_field ‘store’, ‘store\_tags’ %\>  
\<%= submit\_tag “Add” %\>  
\<%= end\_form\_tag %\>

Can anyone help me?
