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

The Archive Base Latest Questions

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

So, I have this HTML form: <form id=search_form class=form_wrapp accept-charset=utf-8 method=get action=http://testing.com/results> <input class=inputbox

  • 0

So, I have this HTML form:

<form id="search_form" class="form_wrapp"
    accept-charset="utf-8" method="get" action="http://testing.com/results">
    <input class="inputbox" type="text" name="search_query">
    <input class="ic_search" type="submit" value="">

    <input type="checkbox" value="checkbox1" name="search_filter[]">
    <label for="Checkbox1">Checkbox1</label>
    <input type="checkbox" value="checkbox2" name="search_filter[]">
    <label for="Checkbox2">Checkbox2</label>
</form>

and it redirects to this URL upon submit with the 2 checkboxes checked

results?search_query=dreams&search_filter[]=checkbox1&search_filter[]=checkbox2

It works like this (inside codeigniter I get the data with $this->input->get('search_filter')), but my question is: I am doing something wrong inside the form, or this is how it’s supposed to work?
And I mean about: &search_filter[]=checkbox1&search_filter[]=checkbox2. Shouldn’t it be something like: &search_filter[]=checkbox1,checkbox2 ? And if not, how can I make it work like that?

  • 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-28T19:15:18+00:00Added an answer on May 28, 2026 at 7:15 pm

    If you want it in the comma format you can do the following:

    $filters = (array) $this->input->get('search_filter');
    $filters = implode(',',$filters);
    

    If you want to alter the format in which the form is submitted, assuming jquery for js:

    $('#search_form').submit(function() {
       var $hidden = $('<input type="hidden" name="search_filter" />').appendTo($(this)),
           $filters = $('input[name^=search_filter]'),
           value = '';
    
          //loop through the filters check if there checked and add them to the value
    
          $hidden.val(value);
    
          $filters.remove();       
    });
    

    Of course if the user doesn’t have js enabled it will submit natively

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

Sidebar

Related Questions

i have this html <ul> <li><form action=# name=formName></li> <li><input type=text name=someName /></li> <li><input type=text
I have a html form with the data by this post method 'form id='form1'
I have this ajax function: function callpage() { $('#formcontent').empty().html('<p class=vent>Pleace wait</p>'); var form =
I have this html form which has options: <tr> <td width=30 height=35><font size=3>*List:</td> <td
I have this HTML dropdown: <form> <input type=text id=realtxt onkeyup=searchSel()> <select id=select name=basic-combo size=1>
I have this form for inputting the birthday in html. But I only have
I have a form in a .html files where input/select box looks like this
This is probably a basic html/css question... I have a simple one-button form that
I am trying to get this form to submit correctly. Here's what I have
I have this form: in header of my website: <% form_tag request.path, :method =>

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.