Page 1 of 1

Back button on CGUserDirectory search gives form warning

Posted: Wed Jan 06, 2021 12:25 am
by webform
When a user does a search in CGUserDirectory, click on details for a user and then click the back button to go back to the search results, gets a browser warning asking to confirm reloading the page search form.

There doesn't seem to be a back functionality built into CGUserDirectory detail view, so have does the user gets back to search results without a browser warning?

Re: Back button on CGUserDirectory search gives form warning

Posted: Thu Jan 07, 2021 7:10 pm
by webform
It happens as CGUserDirectory search uses POST in submitting the form. And using the back button gives a warning in the browser.

I've solved it but changing POST to GET in the search template. Maybe not the prettiest solution, but it works for now:

Code: Select all

{$formstart|replace:'method="post"':'method="get"'}