# How to use values through forms

**URL:** <https://www.ruby-forum.com/t/how-to-use-values-through-forms/131057>\
**Category:** Rails\
**Created:** [March 5, 2008, 5:34pm UTC](https://www.ruby-forum.com/t/how-to-use-values-through-forms/131057 "2008-03-05T17:34:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pimeamark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/9e8a1a/32.png) [@pimeamark](https://www.ruby-forum.com/u/pimeamark)\
**Post date:** [March 5, 2008, 5:34pm UTC](https://www.ruby-forum.com/t/how-to-use-values-through-forms/131057/1 "2008-03-05T17:34:41Z")

</div>

Basically I need to know how to use forms fields when the name for it  
doesn’t match a field in my database. I have a form like this.

\<%= date\_select 'assessment', 'ends\_at\_date', :value =\> "Click here..." %\> \<%= time\_select 'assessment', 'ends\_at\_time'%\>

My database has a field called ends\_at which is a datetime field that  
should have the combination of these 2 forms fields. However, I dont  
know how to interact with the values of form fields with ruby in order  
to do that. This gives me an error right now because there are no  
database fields called ends\_at\_date or ends\_at\_time to correspond to.  
Does anyone know i can use these two fields and combine them and then  
assign that to my ends\_at field? Perhaps through the model or  
controller. Thank alot 😃

---

<div class="post-metadata">

**Author:** ![pimeamark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/9e8a1a/32.png) [@pimeamark](https://www.ruby-forum.com/u/pimeamark)\
**Post date:** [March 5, 2008, 10:54pm UTC](https://www.ruby-forum.com/t/how-to-use-values-through-forms/131057/2 "2008-03-05T22:54:00Z")

</div>

is there some reason you don’t want to just use datetime\_select and  
include both in one field?
