This topic is locked

Required Field in Advanced Search?

7/15/2013 3:39:28 PM
PHPRunner General questions
G
giorgiots author

Hi
I found this code in the tips and tricks section but it doesn't seem to work in for me Field required search advanced

$("#searchButton1").bind("click", {page: this}, function(e){

if(!document.getElementById("value_date_1").value)

{

alert("test test test");

location.reload(true);

}
});


What I'm trying to do is to prevent the user to complete his search (in the advanced search page) if there is no value in the date field (simple edit box with date picker) of the search form. Instead of that when there is no date value I get the alert, but the browser continues to the list page, displaying the whole table.

What am I overlooking?
Thanks in advance
P.S. Phprunner 6.2 (Build 16275)

Sergey Kornilov admin 7/16/2013

PHPRunner 6.2 doesn't have such a feature. We'll be adding it in PHPRunner 7.0.