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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T21:28:15+00:00 2026-05-30T21:28:15+00:00

I have a situation where I’d like to post two values to a search

  • 0

I have a situation where I’d like to post two values to a search query string array from a single checkbox. Because of the design, I can’t just add another checkbox.
The checkbox in question looks like so:

<input name="wpp_search[property_type][]" value="rental_home" type="checkbox" id="choice_c"/>
<label for="choice_c">For Rent</label>

what I now get in the query string is …

{url}?wpp_search[property_type][0]=rental_home 

but what I need is to tie two values to that one check so I end up with this:

{url}?wpp_search[property_type][0]=rental_home&wpp_search[property_type][1]=building

Any simple solutions? There is only one other checkbox that already feeds that array, so I could force this one to be

{url}?wpp_search[property_type][0]=rental_home&wpp_search[property_type][2]=building
  • 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-30T21:28:17+00:00Added an answer on May 30, 2026 at 9:28 pm

    Generally it’s not possible to send one value as two values.

    One way I could imagine is that you reconfigure the ini-setting of arg_separator.input:

    arg_separator.input = ";&"
    

    This will allow you to use ; as well to separate values which then would allow you to inject the second value per that value:

    <input name="wpp_search[property_type][0]" 
           value="rental_home;wpp_search[property_type][1]=building"
           ...
    />
    

    If you make use of the value ; in other form values you naturally need to properly escape them to make this compatible.

    Another way is that you insert a hidden field with that value and if your checkbox is checked, you change the name of it to the right name. If unchecked, you change the name of it back to something not right:

    <input type="hidden" name="---wpp_search[property_type][1]" value="=building" />
    

    Take the javascript reference of your choice and do the needed DOM manipulation on click of the other checkbox to remove the three --- at the beginning of the name.

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

Sidebar

Related Questions

I have situation where I want to extract multiple values from multiple source objects
i have situation like this: class IData { virtual void get() = 0; virtual
I have situation, where running a query that filters by an indexed column in
I have situation in which I read a record from a database. And if
I have situation like this: user submits form with action='/pay' in '/pay' I have
I have situation like this: // Object Class class Person_Object { protected $_id; public
I have situation where I have to call method of interface using reflection, like
I have a situation in which I need to extract Data Annotations information from
I have situation like this: I am doing my own mvc project in visual
I have situation, when click on button opens the new browser window with search

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.