Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

value in text field when empty displays []

 
Rachel Kumar
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have given value using the %{}, but when textfield is empty it just displays [] as default and when a value is populated it shows as [xyz], how do i trim out the brackets?


<s:textfield name="contract" id="contract"
theme="simple" value = "%{contract}"/>


please help!!!
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no need to the "value" attribute. All you need is the "name" attribute; the value will be filled in by the framework.
 
Rachel Kumar
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you i got it
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic