I hope someone can assist me here.
I have a submit form with two inputs to filter the query on another page.
The first input : filter
second input: location
I created two gets value to filter the form.
I also created two value in the define query parameter.
According to @ben, “Thank you for your last help”
dmx-on:success=“browser1.goto(‘your-file?param1=’+value1+’¶m2=’+value2+’¶m3=’+value3)”`
Can be used for multiple params. However, I am not sure how to use this syntax when we have to filter the page using a submit form and url.
I was wondering if I can use something like this: dmx-on:success=“browser1.goto(‘searchBusiness.php?filter=’+value1+’&location=’+value2)”`
And what will be my value1 and value2 if the query is filter is coming from the input form.
For the page that shows the results, first you will need to specify the parameters as per https://docs.wappler.io/t/define-url-parameters/2913
The documentation shows the one parameter, you will need to repeat the process for the second parameter.
The details are displayed in the same page with the filter and location.
However, it is make sure users can use the url if they try to go back to the same info. Or they want to keep the info in the browser.
I tested the form and the filter in the form. It is working and it s showing the result of the filter on the page, but it is not coming from the url parameter.
Then I have a single Server Action with
Globals
$_GET (Right click > Add Variable) and name the variable exactly the same as the input id which is the same as the input name too
So mine looks like this
filter_post_code (Type > Text & Linked Field > BLANK)
filter_email (Type > Text & Linked Field > BLANK)
Then in Execute > Steps I have a Database Connection step and a Database Query that looks like this
SELECT * FROM AcConsumerDB WHERE acCdbAddressPostCode LIKE :&_GET_filter_post_code AND acCdbEmail LIKE :$_GET_filter_email
So basically in the columns area, I added my entire table, then in the conditions area I added the acCdbAddressPostCode field and set it to contains {{$_GET.filter_post_code}} AND acCdbEmail field set to contains {{$_GET.filter_email}}
Hope that helps, it is working perfectly
In my page I have 50k records and i add part of a UK post code like just RH and the records returned are about 900 and then I add part of the email address like sam and the records retuned come down to 4