Check box issue

Discussion in 'Templates, HTML, CSS, and Design Help' started by jason1971, May 7, 2014.

  1. jason1971 Customer

    Hi all,

    I am using the extra fields (set up to use check boxes) with several options to choose from

    Golf course
    tennis court
    fishing lake etc..

    Now I have a search form created and I am trying to include the check boxes within the search form but they do not appear to be working correctly.

    I have it setup as:-

    Bowling: <input type="checkbox" name="opt47" value="Bowling">

    I have setup a test listing in which I have ticked the 'Bowling' checkbox option, yet it is not showing up in the search results.

    Am I doing something wrong ?

    Cheers Jason
  2. Mike-N-Tosh Owner

    Do you have it (the extra field) set to searchable?
  3. jason1971 Customer

    Yes Mike. and it works fine in advanced search. Just not in the search form I have created, and I know my search form is setup correctly because I have used it elsewhere on the site but not calling this particular extra field.
  4. Mike-N-Tosh Owner

    I think this field is different than the others that you already setup, because those are simply boolean fields (Yes/No, Checked/unchecked). This field you have options (similar to a drop down, except with a checkbox, you can select more than one for the ONE field). This makes it an array in the Database.

    I would suggest that you look in the advanced search page code and I believe you will see that the checkbox field set will actually be named "opt27[]" to signify (in php) that it's an array, even if there is only one value in the array in this particular case. That is "opt27" and then a "[" & "]".

Share This Page