JS to auto-select first option on a connection form input

I have a form with a selection drop down to pick from a child connection field. The field is setup in the builder to only show options connected with the parent logged-in user. Even though the parent user may have multiple child connections, the vast majority of users only have a single child connection. So, this drop down field is causing a clumsy experience for those users, offering only one option available for them to select, but they have to manually select it every time. To streamline the user interface and prevent unnecessary clicks, I would like to use javascript to automatically select the first connection in the list. If the user has multiple options, they could select a different one. It would be even more slick to hide this input after selecting the first option for those users that only have a single option to choose from.

Wow… so this is already available in the builder, no JS needed.
Edit Field > Default Value > First Option.

1 Like