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

  • SEARCH
  • Home
  • 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 7721135
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T03:50:53+00:00 2026-06-01T03:50:53+00:00

My view for the new form is <h1>Add Form 3C </h1> <%= form_for([@basiccase, @form3c])

  • 0

My view for the new form is

<h1>Add Form 3C </h1>
<%= form_for([@basiccase, @form3c]) do |f| %>
    <%= render 'shared/error_messages', :object => f.object %>

    <div class="field">
        <%= f.label :date_of_investigation %>
        <%= f.date_select :date_of_investigation, {:include_blank => true, :default => nil} %>
        </div>
 <div class="actions">
        <%= f.submit "Add Form" %>
     </div>

<% end %>

My controller for new and create are

def new
    @title = "New Form 3C"
    @basiccase = Basiccase.find_by_id(params[:basiccase_id])
    @form3c = @basiccase.build_form3_c
  end

  def create
    @basiccase = Basiccase.find_by_id(params[:basiccase_id])
    @form3c = @basiccase.build_form3_c(params[:form3c])
             if @form3c.save
            flash[:success] = "Form created!"
            redirect_to current_user
          else
            flash[:warning] ="Failed to create a Form"
            render 'users/show'
          end
  end

I’m unable to get the value of params[:form3c] into the the create controller. when I tried to check puts params[:form3c] it is showing blank. Can Any on help me where i’m wrong

  • 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-06-01T03:50:54+00:00Added an answer on June 1, 2026 at 3:50 am

    A params key will be based on your class name. Rails expects class names to be mixed case (e.g. BasicCase) and creates the param key by lowercasing and separating the words with an underscore.

    You can check this in a Rails console using #underscore:

    1.9.2p290 :001 > "BasicCase".underscore
     => "basic_case" 
    

    I imagine you have named your class Form3C which becomes form3_c as Dylan suggested.

    You may want to consider renaming both your models to BasicCase and Form3c which should give you params basic_case_id and form3c.

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

Sidebar

Related Questions

When I add a new form to an ASP.NET project (WebForms), and then View
How should I initiate a delete action from my view? Creating a new form-tag
Is it ok to do the following: View(new {Object A, Object B}) Or should
I have a backbone view - which when called presents a form $('#add-offer').click(function() {
My view: <h1>New Address</h1> <% form_for @address, :url => new_address_path do |f| %> <%=
I have a Create New Employee ASP.Net MVC form. My complex object is an
I'm designing a form where you need to add a relation to another object.
I created a new View (LogView) in Infrastructure.Module project. This view will be used
Code: button.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { // fileReader(); new xyz().execute(); }//
I've created a new View-based Application in XCode. In the ViewController, the only code

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.