yuri
Forms Fledgling

Set value of textbox with checkbox

Jump to solution

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

 

 

 

 

 

0 Kudos
Reply
7 Replies
v-tmasenko
Design Canvas Artiste

Re: Set value of textbox with checkbox

Jump to solution

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.

Reply
yuri
Forms Fledgling

Re: Set value of textbox with checkbox

Jump to solution

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

0 Kudos
Reply
CarmScaffidi
Design Dabbler

Re: Set value of textbox with checkbox

Jump to solution

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.

0 Kudos
Reply
yuri
Forms Fledgling

Re: Set value of textbox with checkbox

Jump to solution

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

Yuri

0 Kudos
Reply
CarmScaffidi
Design Dabbler

Re: Set value of textbox with checkbox

Jump to solution

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

0 Kudos
Reply
CarmScaffidi
Design Dabbler

Re: Set value of textbox with checkbox

Jump to solution

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-Associate...

View solution in original post

0 Kudos
Reply
yuri
Forms Fledgling

Re: Set value of textbox with checkbox

Jump to solution

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

Yuri

0 Kudos
Reply