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

How can I make the data in a textbox control a checkbox?

New Here ,
Jun 30, 2017 Jun 30, 2017

I am working with a form (that receives data from an excel spreadsheet) into a Gender textbox: male or female.  In another page later in the document, is a checkbox for male or female.  Is there a way for the corresponding checkbox to get autochecked depending on the variable in the textbox?

TOPICS
PDF forms
635
Translate
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
1 ACCEPTED SOLUTION
Community Expert ,
Jul 02, 2017 Jul 02, 2017

Enter "Male" and "Female" as the export values of your check-boxes (I assume they both have the same name), and then use this code as the custom validation script of the text field:

this.getField("Gender Checkbox").value = event.value;

View solution in original post

Translate
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 ,
Jul 02, 2017 Jul 02, 2017

Enter "Male" and "Female" as the export values of your check-boxes (I assume they both have the same name), and then use this code as the custom validation script of the text field:

this.getField("Gender Checkbox").value = event.value;

Translate
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
New Here ,
Jul 02, 2017 Jul 02, 2017

well, correct me if i'm wrong about this, but I think that code is the checkbox controlling what goes in the textbox.  I need it to work in the reverse.  The excel spreadsheet data I am importing fills in the textbox with male/female and then I need the corresponding checkbox to be checked. 

Translate
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
New Here ,
Jul 02, 2017 Jul 02, 2017
LATEST

Nevermind, it worked both ways.  Sorry for doubting you!  You have been so helpful!

Translate
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