close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

DataAssist Search from checkbox

Thread began 12/16/2012 7:14 pm by eric284736 | Last modified 12/18/2012 1:26 pm by Jason Byrnes | 459 views | 5 replies |

eric284736

DataAssist Search from checkbox

Hi Jason,

I have setup a search thru the search wizard where multiple checkboxes can be selected.
search-clothes.php

The checkboxes have the same name lettersize[] and correctly returns the records from one checkbox (example size 6(S) is checked and those items are shown on the results) if I select size 6(S) and size 8(M) only items from ONE of the selections are shown.

The results page must not be set correctly. Here is the comparison list in the code:


$WADbSearch1->addComparisonFromCheck("lettersize","lettersize","".((isset($_POST["lettersize"]))?$_POST["lettersize"]:"") ."","","AND","=","<>",1);
$WADbSearch1->addComparison("items.ItemCatID","".((isset($_POST["ItemCate"]))?$_POST["ItemCate"]:"") ."","AND","=",1);

Should this be set for Keyword?

thx
Eric

Sign in to reply to this post

Jason ByrnesWebAssist

In the keyword criteria for the checkbox, make sure to set the OR separator to ", " (a comma followed by a space).

with a multiple checkbox, the selections are sent as an array, the array needs to be converted to a comma separated list.

add the following code at line 1 for this:

php:
<?php

if($_SERVER["REQUEST_METHOD"] == "POST")     {
    foreach(
$_POST as $key => $val) {
        if(
is_array($_POST[$key])) $_POST[$key] = implode(", "$_POST[$key]);
    }
}
?>
Sign in to reply to this post

eric284736

Thanks Jason. I have the code inserted at line 1.

Not sure I understand where to change the separator. I have attached the 2 screen shots of the search panel.

thx
Eric

Sign in to reply to this post

Jason ByrnesWebAssist

in the second screen shot, you have the filter type set to check, change it to keyword and make the OR seperator is set to ", "

Sign in to reply to this post

eric284736

Thanks! I made that change, but it still only pulls 1 size selection.
search-clothes.php

if you select 6(S) and 8(M) it only shows the 6(S)

thx
Eric

Attached Files
results.zip
Sign in to reply to this post

Jason ByrnesWebAssist

I have created a support ticket so we can look into this issue further.

To view and edit your support ticket, please log into your support history:
supporthistory.php

If anyone else is experiencing this same issue, please append to this thread.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...