# Update 2 tables with one form

**URL:** <https://www.ruby-forum.com/t/update-2-tables-with-one-form/158911>\
**Category:** Rails\
**Created:** [January 29, 2009, 10:28am UTC](https://www.ruby-forum.com/t/update-2-tables-with-one-form/158911 "2009-01-29T10:28:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sean\_McGilvray](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/8c91f0/32.png) [@Sean\_McGilvray](https://www.ruby-forum.com/u/Sean_McGilvray)\
**Post date:** [January 29, 2009, 10:28am UTC](https://www.ruby-forum.com/t/update-2-tables-with-one-form/158911/1 "2009-01-29T10:28:19Z")

</div>

I have a form:

\<% form\_tag :action =\> ‘create’ do %\>  
\<%= hidden\_field\_tag ‘plan’, params[:plan] %\>

 \<% fields\_for :account do |f| %\>

```
<%= f.text_field :name %>

  <%= f.text_field :domain %>.<%= AppConfig['base_domain'] %>
<% end %>

```

 \<% fields\_for :user do |f| %\> \<%= f.text\_field :login %\>  
 \<%= f.text\_field :eservice %\> PPL Eservice Login (If Known)  
 \<%= f.text\_field :first\_name %\>  
 \<%= f.text\_field :last\_name %\>  
 \<%= f.text\_field :email %\>  
 \<%= f.text\_field :contact\_number %\>  
 Password \<%= f.password\_field :password %\>  
 Password Confirmation \<%= f.password\_field :password\_confirmation %\> \<% end %\> 

I would like to only have the second part of the form and have the  
fields first\_name last\_name update the account table name and have  
login update the account table domain. Do you know how to do this?

Thank you,

Sean McGilvray
