# Please help me ------ Mapping an item to article

**URL:** <https://www.ruby-forum.com/t/please-help-me-mapping-an-item-to-article/178858>\
**Category:** Rails\
**Created:** [November 12, 2009, 1:12pm UTC](https://www.ruby-forum.com/t/please-help-me-mapping-an-item-to-article/178858 "2009-11-12T13:12:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rails\_ROR](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/9f8e36/32.png) [@Rails\_ROR](https://www.ruby-forum.com/u/Rails_ROR)\
**Post date:** [November 12, 2009, 1:12pm UTC](https://www.ruby-forum.com/t/please-help-me-mapping-an-item-to-article/178858/1 "2009-11-12T13:12:14Z")

</div>

Hi everybody,

I have a form like this

# New menuitem

\<% form\_for(@menuitem) do |f| %\>  
\<%= f.error\_messages %\>

\<%= f.label :title %\>  
 \<%= f.text\_field :title %\>

\<%= f.label :alias %\>  
 \<%= f.text\_field :alias %\>

\<%= f.label :article\_id %\>  
 \<%= f.text\_field :article\_id %\>

\<%= f.label :published %\>  
 \<%= f.check\_box :published %\>

\<%= f.label :link %\>  
 \<%= f.text\_field :link %\>

\<%= f.submit 'Create' %\>

\<% end %\>

\<%= link\_to ‘Back’, menuitems\_path %\>

for this \<%= f.text\_field :article\_id %\> i want to have a select button  
(browse) ,when clicked on that should open a popup to select the  
article.  
When i select a article from the list of articles, its id is stored in  
the  
table and when i clicked on the item i need to display the article.

Please help me. I would be really thankful if you can guide me on this.  
Please show me a way to proceed further.

---

<div class="post-metadata">

**Author:** ![Rails\_ROR](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/9f8e36/32.png) [@Rails\_ROR](https://www.ruby-forum.com/u/Rails_ROR)\
**Post date:** [November 13, 2009, 4:16pm UTC](https://www.ruby-forum.com/t/please-help-me-mapping-an-item-to-article/178858/2 "2009-11-13T16:16:09Z")

</div>

maybe ajax is satisfied.

2009/11/12 Rails ROR [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> ```
> <%= f.label :title %><br />
> 
> <%= f.submit 'Create' %>
> 
> ```
> 
> Please help me. I would be really thankful if you can guide me on this.  
> Please show me a way to proceed further.
> 
> >

–  
tommy xiao  
E-mail: xiaods(AT)[gmail.com](http://gmail.com)
