So my dynamic page has a filter options that decide what data to show. The user can adjust the filter to show another set of results.
To make the experience better I’d like to have a “default” set of values for the filter and show the results for that default set first (while letting the user know that they can adjust it).
The problem is I can’t seem to be able to “execute” the click of the button.
Here’s what I’m doing in the code:
//set default procedure for the page
let chosenProcedure = 'MRI Scan Without Contrast';
//set the dropdown to be the default and execute button
$w.onReady(function () {
$w("#procedureDropdown").value = chosenProcedure;
button2_click();
});
export async function button2_click(event) {
//lots of code that shows the right data in the repeater
}
Any idea why isn’t it working?