Announcements
Hi all
I have a form where i have 20 required fields.
Suppose i have filled-in 5 fields from
The 20 mandatory fields and then i submit the form. I would like to focus automatically to one of the 15 empty fields randomly
How to do this ?
Hi @jd71 Can you explain a bit more?If there are 20 required fields, why are you allowing the user to submit only 5 of the 20 required fields?
Sure.
User is not allowed to submit without fill-in all 20 required fields.
I'm using form.valid method to notify the user that some required fields are empty.
The problem is that those 20 required fields are splitted in different tabs on the form and when users receives the notify that say "you must fill in required fields" they don't know where are these required fields.
That's why i would like to focus randomly to a required field that is empty.
Ahh - thanks for the explanation!I can take you part of the way there.
You are going to have to build a collection that tracks the number of fields that have been filled in and in which tab.e.g. in the Onchange property of each control:
Collect( colFormTracker, { tabName: "Tab1", FieldName: "DatePicker3" } )
Then colour code your tabs. E.g. if you have 4 tabs with 5 fields in each tab. Count the number of fields that have been completed for the associated tab and colour the tab e.g. red if less than 5 fields have been completed or green if all 5 fields have been completed.This way the user knows which tab contains the empty field(s).
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 397 Super User 2026 Season 2
Mohsin Ali 354
WarrenBelz 232 Most Valuable Professional