Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3801426
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T14:02:54+00:00 2026-05-19T14:02:54+00:00

I have a model, and I have a view that displays a form for

  • 0

I have a model, and I have a view that displays a form for creating a new object based on that model. Let’s call that form, Form1.

Once the user submits Form1, the object is created. I then want to display, on the following page, a second form Form2, which asks the user to check off various options before the object is saved to the database.

My problem is probably extremely basic. I don’t know how to create Form2, given that it is not tied directly to the model. Because I am a Rails newbie, I have only created forms as following:

form_for(@object) { |f| ... }

@object is an object instantiated from the model

Problem: I do not believe that kind of code will work for my purposes here. How do I create Form2, given that it must not be based on @object or @object‘s model?

Some specifics from my app:

The site accepts values (Form1) before redirecting to an OAuth server.

When the user verifies her credentials on the OAuth server, she is redirected back to my site. An XML-RPC request then retrieves information about the user’s account on the OAuth server.

The XML response may indicate that the user has only one account on the OAuth server. If so, some values are retrieved from the XML and added to the object–which is then (finally) saved in the database–and the user is redirected to a success page.

However, if the XML response indicates that the user has multiple accounts on the OAuth server, I want to display a form (Form2) that allows the user to select which accounts on the OAuth server to associate with my site. So Form2 really asks the user how many objects to create, rather than about specific attributes of an object.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T14:02:55+00:00Added an answer on May 19, 2026 at 2:02 pm

    Use form_tag instead of form_for, then use the appropriate form helpers: text_field_tag instead of f.text_field, text_area_tag instead of f.text_area, etc. Example:

    <%= form_tag "/my_controller/update2" do %>
      <%= text_field_tag "account", "default info" %>
      <%= submit_tag "Save" %>
    <% end %>
    

    The Rails API site has a great reference to all of the _tag helpers: http://api.rubyonrails.org/classes/ActionView/Helpers/FormTagHelper.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

if i have created a view model and have a partial form that is
So let's say I have a view that access a date: <%= Html.TextBoxFor(model =>
I have a jquery modal dialog that displays a partial view. The partial view
I have a view model that is displayed in a view that uses uploadify.
I have a view model that contains a Product class type and an IEnumerable<
I am using javascript unobtrusive validation. I have a view model that I am
I have a Backbone View that has a Collection as its Model. If the
I have a Java project that I'm trying to implement with a model-view-controller design.
I have a model that gets it's view-count updated after it's viewed. This is
(I'm using Cairngorm) I have a combobox that displays items form an XMLListCollection that's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.