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

Form field auto populates date when radio button is selected

Community Beginner ,
Jun 01, 2022 Jun 01, 2022

Copy link to clipboard

Copied

Trying to figure out how to have a form field auto fill the current date when a specific radio button is selected. 

TOPICS
JavaScript , PDF forms

Views

655

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

correct answers 1 Correct answer

Community Expert , Jun 13, 2022 Jun 13, 2022

'Choice1' is radio button choice not field name. Go to radio button field properties and under 'Options' tab change 'Radio button choice'.

Votes

Translate

Translate
Community Expert ,
Jun 01, 2022 Jun 01, 2022

Copy link to clipboard

Copied

As Mouse UP event of that radio button use something like this:

if(event.target.value == "Choice1")
this.getField("Date").value = new Date();

Change field name and choice if needed.

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
Community Beginner ,
Jun 13, 2022 Jun 13, 2022

Copy link to clipboard

Copied

Cant get this to work but it is probably me. I am adding this as a mouse up event to the radio button. I am changing "Choice1" to the radio button name and "Date" to the date field name. Nothing happens when I select the radio button. (sorry still way new and learning)

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
Community Expert ,
Jun 13, 2022 Jun 13, 2022

Copy link to clipboard

Copied

'Choice1' is radio button choice not field name. Go to radio button field properties and under 'Options' tab change 'Radio button choice'.

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
Community Beginner ,
Jun 14, 2022 Jun 14, 2022

Copy link to clipboard

Copied

LATEST

excellent got it to work, thank you!

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