Check field equal a value once it is clicked

New Here ,
Sep 16, 2022 Sep 16, 2022

Copy link to clipboard

Copied

How can I make a check mark equal a number in a different field once its clicked?

 

TOPICS
How to

Views

42

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

Community Expert , Sep 16, 2022 Sep 16, 2022

As 'Mouse UP' action of that checkbox, add this script:

if(event.target.value != "Off")this.getField("Text1").value = 500;

Likes

Translate

Translate
Community Expert ,
Sep 16, 2022 Sep 16, 2022

Copy link to clipboard

Copied

This is a very vague explanation, can you please elaborate?

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
New Here ,
Sep 16, 2022 Sep 16, 2022

Copy link to clipboard

Copied

Daidrien26152486mi89_0-1663343510806.png

How can I make text1 equal 500 when the check mark is checked? 

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 Expert ,
Sep 16, 2022 Sep 16, 2022

Copy link to clipboard

Copied

As 'Mouse UP' action of that checkbox, add this script:

if(event.target.value != "Off")this.getField("Text1").value = 500;

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
New Here ,
Sep 16, 2022 Sep 16, 2022

Copy link to clipboard

Copied

It worked. 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
New Here ,
Sep 16, 2022 Sep 16, 2022

Copy link to clipboard

Copied

How can I make it so it subtracts the value from the field if the checkmark is unselected? 

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 ,
Sep 16, 2022 Sep 16, 2022

Copy link to clipboard

Copied

LATEST

Update your code to this:

if(event.target.value != "Off")this.getField("Text1").value = 500;
else
this.getField("Text1").value = "";

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