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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:06:44+00:00 2026-05-27T18:06:44+00:00

I am developing a faceted search system. Below the search box, there’s a radio

  • 0

I am developing a faceted search system. Below the search box, there’s a radio select widget that has the options:

O New search     O Within your results

When the page is loaded, new search should be selected by default, so I’m using the initial keyword for that.

The problem I have is that after a user selects New search and places a query, I want the default to be switched to Within your results, since most searches are refinements.

So what I need to do is change the value the user submitted, which is stored in a Django Form.

How can I change the value of the form field? Validation has already occurred, and from what I have gathered so far, request.GET is immutable (probably a good thing), and I can’t change the Form either.

  • 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-27T18:06:45+00:00Added an answer on May 27, 2026 at 6:06 pm

    Just an idea, instead of hacking the user input you could show that field only when you have a query parameter for the search.

    This way the first time the user ‘hit’ the view he doesn’t see the useless radio field.

    e.g. here I would use the searching param during the __init__ of the form to set the field as hidden and with the right initial value ( you can also do something like DrTysa suggested and move the searching detection at form level looking at the data dict)

    searching = False
    if data.get('query'):
        searching = True
    form = SearchForm(data, searching=searching)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Iam developing one application.In that iam placing the radio buttons(uiimageview) on table view and
Developing a site that requires monthly subscriptions via PayPal. If a buyer has an
Developing rails has become lots of fun over the year that I've done it,
Developing search utility to search a file entire computer system, works fine on windows
Developing an HTML 5 application on new iPad's Mobile Safari iOS 5 that displays
For developing an devices monitor system, I am using a InetAdress isReachable method to
iam developing one application.In that i need to get the music files from the
Developing a series of POCOs on my project, and just realized that some of
Developing a new ROR3 website, I need to implement a sort of internal mail
Developing for iPhone, I have a collection of points that I need to make

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.