- Issue created by @adhershmnair
- ๐ฎ๐ณIndia adhershmnair Trivandrum
On selecting a webform from the autocomplete input, the form tag is having an attribute `data-drupal-form-submit-last=` which have the selected autocomplete. When clicking the back button the data attribute is still there but not doing anything. If we remove the data attribute from the form tag on back button, then the filter will work as expected.
- Merge request !511Issue #3471061: Allow webform filter form submission after browser back โ (Open) created by adhershmnair
- Status changed to Needs review
about 1 year ago 7:02pm 29 August 2024 - ๐ต๐ญPhilippines regina.meow
We are on a workshop today and my first contribution to Drupal community is to review the changes within the next hour.
- ๐ต๐ญPhilippines regina.meow
I have done manual testing but I observed different result from the expected result.
Specifications:
simplytest.me
Webform - 6.3.x-dev
Drupal core 10.3.3
Patch: https://git.drupalcode.org/project/webform/-/merge_requests/511.diff
Install profile: StandardAll the following steps were reproduced and observed.
- Navigate to Admin -> Structure -> Webform.
- In the Filter Webforms section, use the input field to search for a webform name.
- From the autocomplete suggestions, select a webform.
- Drupal will automatically redirect to the selected webform without needing to click the filter button.
- Click the browser's back button to return to the webform listing page.
- Observe that the input field is still populated with the previously searched webform name.
- Notice that the result is not filtered.
- Click the Filter button.
Expected Result: The webform listing should be filtered based on the keyword in the input field.
Actual Result: Clicking the Filter button will redirect to the webform previously selected from the autocomplete suggestions.
- ๐บ๐ธUnited States jrockowitz Brooklyn, NY
I agree that the "Expected Result: The webform listing should be filtered based on the keyword in the input field.".
I am not sure how we can reset, via JS, the filter value after the form is submitted via autocompletion.
- Status changed to Needs work
20 days ago 5:52pm 27 August 2025 - ๐บ๐ธUnited States jrockowitz Brooklyn, NY
jrockowitz โ changed the visibility of the branch 3471061-filter-webforms-not to hidden.
- ๐บ๐ธUnited States jrockowitz Brooklyn, NY
For the immediate back button issue, we need to add the .webform-remove-single-submit class to filter forms with autocompletion.
@see https://git.drupalcode.org/project/webform/-/blob/6.3.x/js/webform.form....
- ๐บ๐ธUnited States jrockowitz Brooklyn, NY
Expected Result: The webform listing should be filtered based on the keyword in the input field.
We can't filter the form because it was never submitted back to the server.
Also, I don't think we can clear the input value when the user clicks back.
The best solution is to allow them to edit or resubmit the filter with the autocompleted value.
- Merge request !716Issue #3471061: "Filter webforms" not working after using browser's back button โ (Merged) created by jrockowitz
-
jrockowitz โ
committed d43e4dea on 6.3.x
Issue #3471061 by jrockowitz, adhershmnair, regina.meow, cilefen: "...
-
jrockowitz โ
committed d43e4dea on 6.3.x
-
jrockowitz โ
committed d43e4dea on 6.x
Issue #3471061 by jrockowitz, adhershmnair, regina.meow, cilefen: "...
-
jrockowitz โ
committed d43e4dea on 6.x