From 278637fe4b6b22a07bedb11948162eeb31bdfc3c Mon Sep 17 00:00:00 2001 From: shivamvish160 <108731648+shivamvish160@users.noreply.github.com> Date: Wed, 1 Oct 2025 19:50:22 +0530 Subject: [PATCH 1/2] Create README.md --- .../README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 Client-Side Components/Client Scripts/ Improve UX by focusing on the first editable field when a form loads./README.md diff --git a/Client-Side Components/Client Scripts/ Improve UX by focusing on the first editable field when a form loads./README.md b/Client-Side Components/Client Scripts/ Improve UX by focusing on the first editable field when a form loads./README.md new file mode 100644 index 0000000000..2b2c4c6ac9 --- /dev/null +++ b/Client-Side Components/Client Scripts/ Improve UX by focusing on the first editable field when a form loads./README.md @@ -0,0 +1 @@ +This client-side script automatically sets focus to the first visible input field when a form loads, improving user experience and reducing clicks From 35ff085b6c63d262ba9e7ce701d98e5c966a86e5 Mon Sep 17 00:00:00 2001 From: shivamvish160 <108731648+shivamvish160@users.noreply.github.com> Date: Wed, 1 Oct 2025 19:51:46 +0530 Subject: [PATCH 2/2] Create client.js --- .../client.js | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 Client-Side Components/Client Scripts/ Improve UX by focusing on the first editable field when a form loads./client.js diff --git a/Client-Side Components/Client Scripts/ Improve UX by focusing on the first editable field when a form loads./client.js b/Client-Side Components/Client Scripts/ Improve UX by focusing on the first editable field when a form loads./client.js new file mode 100644 index 0000000000..4223435069 --- /dev/null +++ b/Client-Side Components/Client Scripts/ Improve UX by focusing on the first editable field when a form loads./client.js @@ -0,0 +1,4 @@ +var inputs = document.querySelectorAll('input:not([type=hidden])'); + if (inputs.length > 0) { + inputs[0].focus(); + }