• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit Search
0

Allow user to write over auto-filled entry from custom calculation script

New Here ,
Mar 03, 2023 Mar 03, 2023

Copy link to clipboard

Copied

This seems like it should be easy, but I'm just not getting it.  Simple hypothetical to capture my issue:

 

I have a dropdown menu where the user selects a teacher's name.

I have a field for "classroom" that autopopulates with the teacher's classroom number using: 

 

var selectedTeacher = this.getField("Teacher").value;

if (selectedTeacher=="Teacher1") event.value = "Room1";

else if (selectedTeacher=="Teacher2") event.value = "Room2";

. . . 

else event.value = "";

 

But sometimes, the teachers are assigned to different rooms.  So I want the user to be able to manually type over the room number that autopopulates (for example, to replace auto-filled "Room2" with a typed in "Room1" if Teacher2 happens to be in Room1 for the day.

 

Can anyone assist?

TOPICS
PDF forms

Views

402

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 03, 2023 Mar 03, 2023

Copy link to clipboard

Copied

LATEST

Use a validation script at the dropdown.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines