Autofill text fields depending on dropbox value in Rails

16 views
Skip to first unread message

Poombavai Sivamani

unread,
Mar 24, 2016, 5:06:28 AM3/24/16
to rubyonra...@googlegroups.com
Hi..I want to make some of my text fields to auto fill with zero(0),
when the user selects NA in dropdown.. How can I achieve that? Is there
any rails way to do that??


I have seen lot of jquery to accomplish auto fill values.. I am new to
rails as well as am zero at jquery.. That is why I am looking for a
rails way to do that.

Kindly please someone help me.

--
Posted via http://www.ruby-forum.com/.

Colin Law

unread,
Mar 24, 2016, 5:29:10 AM3/24/16
to Ruby on Rails: Talk
On 24 March 2016 at 09:05, Poombavai Sivamani <li...@ruby-forum.com> wrote:
> Hi..I want to make some of my text fields to auto fill with zero(0),
> when the user selects NA in dropdown.. How can I achieve that? Is there
> any rails way to do that??
>
>
> I have seen lot of jquery to accomplish auto fill values.. I am new to
> rails as well as am zero at jquery.. That is why I am looking for a
> rails way to do that.

jQuery is the way to do it. I suggest starting by finding some
tutorials, probably best to start off with basic javascript.
Scripting in the browser is not trivial however, be prepared to spend
some time learning the basics.

Colin

Poombavai Sivamani

unread,
Mar 24, 2016, 6:05:38 AM3/24/16
to rubyonra...@googlegroups.com
Colin Law wrote in post #1182423:
Thankyou Colin.. I will start to learn javascript.. Thankyou for your
response..
Reply all
Reply to author
Forward
0 new messages