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

65

Likes

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

Adobe Community Professional , 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'.

Likes

Translate

Translate
Adobe Community Professional ,
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.

Likes

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)

Likes

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
Adobe Community Professional ,
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'.

Likes

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!

Likes

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