DMXzone Database Connector PHP Support Product Page
Solved
Form filter not working
Reported 11 years ago
1
has this problem
11 years ago Eric Jennings posted:
I have setup a form variable search and it does not filter the results.The Database Source Testing shows the correct results and the default results show on the page. Once I enter a search variable then it refreshes the data, but it does not filter the results.
the code on the page:
<form name="form1" method="post" action=""> <input type="text" name="search" id="search"> <input name="submit" type="submit" id="submit" onClick="dmxDataBindingsAction('refresh','Property',{'url':'dmxDatabaseSources/PropertiesListing.php?search={{$FORM.search}}&limit=25'})" value="Submit"> </form> <p> </p> <div class="repeat1" data-binding-id="repeat1" data-binding-repeat="{{Property.data}}"> <p><img src="uploads/{{MainPhoto}}" width="250" data-binding-src="{{MainPhoto}}" /></p> <p>searchtype: {{SearchType}}</p> <p>propertytype: {{PropertyTYPE}}</p> <p>{{Price}}</p> <p>District: {{District}}</p> <p>Area: {{Area}}</p> <p>Country: {{Country}}</p> <p>Bedrooms: {{Bedrooms}}</p> <p>Bathrooms: {{Bathrooms}}</p> </div>
What am I missing and what other info do you need?
Replies
Replied 11 years ago
11 years ago Eric Jennings replied:
Also, when I try to test this on the production, I just a blank page.
thx
Eric
thx
Eric
Replied 11 years ago
11 years ago Teodor Kuduschiev replied:
Hello Eric
Please provide a link to your page.
Please provide a link to your page.
Replied 11 years ago
11 years ago Eric Jennings replied:
Replied 11 years ago
11 years ago Teodor Kuduschiev replied:
Please attach any of this pages to an email to:
teodor@dmxzone.com
Replied 11 years ago
11 years ago Eric Jennings replied:
On the way.
thx
Eric
thx
Eric
Replied 11 years ago
11 years ago Eric Jennings replied:
Teodor,
Did you get my email?
thx
Eric
Did you get my email?
thx
Eric
Replied 11 years ago
11 years ago Teodor Kuduschiev replied:
Are you sure your files are uploaded to the server?
Even the www.rentparisapartmentonline.com/test/ScriptLibrary/jquery-latest.pack.js file returns an empty result - there is something wrong there.
Even the www.rentparisapartmentonline.com/test/ScriptLibrary/jquery-latest.pack.js file returns an empty result - there is something wrong there.
Replied 11 years ago
11 years ago Eric Jennings replied:
Yes, but I think that is a server issue I need to resolve. My first step was to get it working correctly on my local setup.
Do the pages look correct to you?
Do the pages look correct to you?
Replied 11 years ago
11 years ago Teodor Kuduschiev replied:
Yes, the code generated in the test.html looks good to me for using the search form.
The search.html is also okay to be used with a URL variable.
The search.html is also okay to be used with a URL variable.
Replied 11 years ago
11 years ago Eric Jennings replied:
Okay, I have it loaded to the server.
Go here:
www.rentparisapartmentonline.com/test/test.html
And type in Italy for the form search. It returns the default properties and none of the Italy properties (there are several Italy properties in the database).
I want to basically build this:
www.dmxzone.com/demo/php/HTML5DataBindings/LuxuryYachts/index.html
thx
Eric
Go here:
www.rentparisapartmentonline.com/test/test.html
And type in Italy for the form search. It returns the default properties and none of the Italy properties (there are several Italy properties in the database).
I want to basically build this:
www.dmxzone.com/demo/php/HTML5DataBindings/LuxuryYachts/index.html
thx
Eric
Replied 11 years ago
11 years ago Teodor Kuduschiev replied:
Please remove the submit property from the button
You don't need to submit the form.
It should be type="button"
Actually the form automatically refreshes the content as soon as you click out of the search field. That's why you need this "dummy button", that does nothing when it is clicked.

It should be type="button"
Actually the form automatically refreshes the content as soon as you click out of the search field. That's why you need this "dummy button", that does nothing when it is clicked.
Replied 11 years ago
11 years ago Eric Jennings replied:
Done. I added a record count, but it is still not filtering.
The filter condition is using "Contains".
The filter condition is using "Contains".
Replied 11 years ago
11 years ago Teodor Kuduschiev replied:
Your
Should be
As now it only submits the form, which clears the search phrase.
<input id="button" type="submit" ...
Should be
<input id="button" type="button" ...
As now it only submits the form, which clears the search phrase.
Replied 11 years ago
11 years ago Eric Jennings replied:
Got it 
It works now, thanks!!

It works now, thanks!!
Replied 11 years ago
11 years ago Eric Jennings replied:
Is there a tutorial for this showcase:
www.dmxzone.com/demo/php/HTML5DataBindings/LuxuryYachts/index.html
This is exactly what I need to build.
thx
Eric
www.dmxzone.com/demo/php/HTML5DataBindings/LuxuryYachts/index.html
This is exactly what I need to build.
thx
Eric
Replied 11 years ago
11 years ago Teodor Kuduschiev replied:
You're welcome. You can also use a simple button:
<button type="button">Click Me!</button>

Replied 11 years ago
11 years ago Teodor Kuduschiev replied:
Unfortunately there is no any tutorial but it is the same and there is no need of a button as when the value is changed in the select field, the data is automatically refreshed.
Replied 11 years ago
11 years ago Eric Jennings replied:
Got it. I can just replace the text boxes with select list. I don't even need a form correct?
thx
Eric
thx
Eric
Replied 11 years ago
11 years ago Teodor Kuduschiev replied:
Yes, exactly and no Form is needed.
Replied 11 years ago
11 years ago Eric Jennings replied:
Thanks Teodor!!