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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:59:08+00:00 2026-05-18T10:59:08+00:00

Is it possible to set the location you want to submit a form to

  • 0

Is it possible to set the location you want to submit a form to dynamically at runtime with a form_tag? What I have is a shared partial view that is used to filter data on several screens. The view contains several different form fields and a submit button, so the UI for these controls is the same for all the screens that use it, thus the shared partial view. The difference is that I want the submit to go back to a different location depending upon which page the partial view is contained in. Is there someway to pass the destination in via the render tag like the following?

<%= render 'shared/event_filter', :dest => event_path %>

and then consume it within the partial view as follows?

<%= form_tag(:dest, :method => "get") do %>

The above code doesn’t work, it gives me a nomethod error on the :dest in the form_tag, but I was just putting in this question to help illustrate what I was trying to do.

Any help/suggestions would be appreciated.

  • 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-18T10:59:08+00:00Added an answer on May 18, 2026 at 10:59 am

    I think you might be looking for something along these lines:

    <%= render :partial => 'shared/event_filter', :locals => {:form_action => event_path} %>
    

    Which just renders the partial named shared/_event_filter.html.erb and passes in a variable called form_action with value of event_path.

    Then inside your partial:

    <%= form_tag form_action, :method => "get" do %>
        <!-- snip -->
    <% end %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have an application that for a set of parameters (location, category, budget,
Is it possible to set up a cron job that will execute a php
Is it possible to set env vars in pom.xml that junit tests uses? Netbeans
Is it possible to set z-index that only applies to a certain 'scope', such
I'm wondering.. 1)is it possible to set an imageview's resource to the URL location
Possible Duplicate: CakePHP: image inside link, want to make link point to image location
I have a set of php processing pages that interact together by passing data
Is it possible to set a session cookie on login.app.com, and have the session
I have a Delphi 6 app that embeds the Chromium web browser. I want
i want to to a request.JSON on a dynamic form. is it possible to

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.