Newbea question

I have t_project model and want to get “id” and “from_date” datas. how
can I call them I didnt understand codes at all. I need to add the
values to textbox ? could you pls check the model .

Ibrahim D. wrote:

I have t_project model and want to get “id” and “from_date” datas. how
can I call them I didnt understand codes at all. I need to add the
values to textbox ? could you pls check the model .

Is “id” and “from_date” the fields in table t_projects? Do you want to
insert data
into this table or edit the current data?

Suneeta Km wrote:

Ibrahim D. wrote:

I have t_project model and want to get “id” and “from_date” datas. how
can I call them I didnt understand codes at all. I need to add the
values to textbox ? could you pls check the model .

Is “id” and “from_date” the fields in table t_projects? Do you want to
insert data
into this table or edit the current data?

“id” and “from_data” are the fields in the table. I want to insert data
from fields to textbox in view. is it possible ? I got two textbox one
is for id one is for from_date…

thanks for your reply…

Ibrahim D. wrote:

Suneeta Km wrote:

Ibrahim D. wrote:

I have t_project model and want to get “id” and “from_date” datas. how
can I call them I didnt understand codes at all. I need to add the
values to textbox ? could you pls check the model .

Is “id” and “from_date” the fields in table t_projects? Do you want to
insert data
into this table or edit the current data?

“id” and “from_data” are the fields in the table. I want to insert data
from fields to textbox in view. is it possible ? I got two textbox one
is for id one is for from_date…

thanks for your reply…

It is possible… In the controller u first find the fields from the
table and store it in an instance variable.

@t_project= TProject.find(id) // id will be the id of the field u want
to find

then in the view:
<%= text_field “t_project”, “id” %>
<%= text_field “t_project”, “from_data” %>

this will populate the text box with the value in the table

<%= text_field “t_project”, “id” %>
<%= text_field “t_project”, “from_data” %>

this will populate the text box with the value in the table

thanks