Skip to main content
Nintex Community Menu Bar
Solved

Set value of textbox with checkbox

  • February 26, 2020
  • 7 replies
  • 203 views
  • Translate

yuri

I have the following:

 

Checkbox named chkBox

Textbox namded txtBox. It has default value of 0.

I need to put new value (1,2,3,etc.) in the textbox when I click the checkbox.

I not expert in javascript and having very much difficulty in making this work.

Any help is greatly appreciated.

Yuri

 

 

 

 

 

Best answer by CarmScaffidi

This solution posted by Simon Muntz looks like an ideal exmple for you get an idea on how to use JavaScript in the Classic Form. 

 

https://community.nintex.com/t5/Nintex-for-SharePoint/Nintex-Forms-If-Box-is-Checked-Clear-Associated-Number-Fields-to/m-p/100806#M70005

View original
Did this topic help you find an answer to your question?

7 replies

Forum|alt.badge.img+9
  • 157 replies
  • February 26, 2020

No Javascript required. Just use the New Responsive Designer to create 3 rules corresponding to all the values in the chkBox and sets the corresponding value in your txtBox.

 

Attached is the example in the form and 3 rules.

Translate

yuri
  • Author
  • 10 replies
  • February 27, 2020

I am sorry. I should have said that this is a Classic form.

Translate

CarmScaffidi
Forum|alt.badge.img+2

What you are trying to do is very straight forward in JavaScript, I would suggest you spend some time over at https://www.w3schools.com/js/default.asp so you will see for yourself how easy it is.

Translate

yuri
  • Author
  • 10 replies
  • February 27, 2020

Thank you for your response. I will  employ your suggestion but I need to solve this problem most quickly.

Yuri

Translate

CarmScaffidi
Forum|alt.badge.img+2

A hint for you to help get you started quicker :-)  You can also try JavaScript within that location so you can quickly see if what you coded works or not. 

 

Good luck!

 

https://www.w3schools.com/howto/howto_js_display_checkbox_text.asp

Translate

CarmScaffidi
Forum|alt.badge.img+2

This solution posted by Simon Muntz looks like an ideal exmple for you get an idea on how to use JavaScript in the Classic Form. 

 

https://community.nintex.com/t5/Nintex-for-SharePoint/Nintex-Forms-If-Box-is-Checked-Clear-Associated-Number-Fields-to/m-p/100806#M70005

Translate

yuri
  • Author
  • 10 replies
  • February 27, 2020

Thank you for your kindness. I will try the example.

Yuri

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings