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 8204373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T07:52:49+00:00 2026-06-07T07:52:49+00:00

i have this form : <h1> Global data management </h1> </br> </br> <h2>Enter the

  • 0

i have this form :

<h1> Global data management </h1> </br> </br>
<h2>Enter the conditions and click "find" option to search for users based on conditions. </br> Or click the "List" option to list all the data.  </h2>
</br></br></br>
<%= form_for(:find_field, url: find_field_path , method: :get) do |f| %>
<div class="row">
      <div class="span8 offset1">
        <div class = "row">
            <div class = "span4">
              <div class="field">
              <%= f.label :data_type_choice, "Data type" %> 
              <%= f.select :data_type_choice, [["all","all"],["2D","2D"],["3D","3D"],["2D3C","2D3C"],["3D3C","3D3C"]] , :name => nil%>
              </div>
              </br></br>
              <h3> COMPLETED WITHIN </h3>:</br>
              <div class="field">
                <%= f.label :from_date_choice , "From date " %>
                <%= f.date_select :from_date_choice , :name => nil%>
              </div>          
            </div>

            <div class = "span4">     
              <div class="field">
              <%= f.label :basin_choice, "Basin" %>
              <%= f.select :basin_choice, [["all","all"],["Cauvery","Cauvery"],["KG-PG","KG-PG"],["others","others"]] , :name => nil %>
              </div>      
              </br></br>
              <h3>&nbsp</h3>
              <div class="field">
                <%= f.label :to_date_choice , "To date " %>
                <%= f.date_select :to_date_choice , :name => nil %>
              </div>
            </div>
        </div>    

                </br></br>
              <%= f.submit "  Search  ", class: "btn btn-large btn-primary" %>

      </div>
</div>
<% end %>

everything works perfectly, all the parameters are passed correctly etc, but in the view where im trying to display the result, i get a HUGE url like so:

http://localhost:3000/global/data/find?utf8=%E2%9C%93&find_field%5Bdata_type_choice%5D=2D&find_field%5Bfrom_date_choice%281i%29%5D=2012&find_field%5Bfrom_date_choice%282i%29%5D=7&find_field%5Bfrom_date_choice%283i%29%5D=9&find_field%5Bbasin_choice%5D=KG-PG&find_field%5Bto_date_choice%281i%29%5D=2012&find_field%5Bto_date_choice%282i%29%5D=7&find_field%5Bto_date_choice%283i%29%5D=9&commit=++Search++

ive tried using the “:name => nil” as shown in this railscast
why is this happening and how can i reduce the url size to just “http://localhost:3000/global/data/find&#8221; ?

EDIT:

this is my find method in fields_controller:

  def find

    @data_type_choice = params[:find_field][:data_type_choice]
    @basin_choice = params[:find_field][:basin_choice]
    @from_date_choice = params[:find_field][:from_date_choice]
    @to_date_choice = params[:find_field][:to_date_choice]

  end

i also want to display the data entered in the form through find.html.erb like so:

<h1><%= @data_type_choice %> dsfgdfsg</h1>

if i make it a post request, the erb is not being rendered! what can i do?

thanks 🙂

  • 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-07T07:52:52+00:00Added an answer on June 7, 2026 at 7:52 am

    Just change your method from GET to POST and change the routes accordingly.

    Try

    <%= form_for(:find_field, url: find_field_path , method: :post) do |f| %>
    

    Your routing file should match the request as POST.

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

Sidebar

Related Questions

i have this form to serialize once i click the submit button, <form class=cashier_forms
When I try to enter data from a form I have made it adds
When I try to enter data from a form I have made it adds
I have this form, in which i need to populate a combo box with
I have this form: <%= form_tag posts_path, :method => :get, :class => search_nav do
I have this form: <tbody> <tr> <th>ID</th> <th>Name</th> <th>Birthdate</th> <th><input type=text autofocus=autofocus name=textinput1/></th> <th><input
I have this Form I am trying to upload my image but every time
I have this: form = $('#<%= params[:board_id] %>'); var $parent = form.closest(.biscuit).eq(0); I want
I have this form with a date input. echo $this->Form->create('Nodata'); echo $this->Form->input('date1', array('type' =>
I have this form: <form> <div class=box> <h1>Contact form :</h1> <label> <span>Typ: </span> <input

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.