Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

display selected checkbox info in text field

asd22
Tera Contributor

Hello.

 

I have 3 check boxed

1: [] 10usd

2: [] 20usd

3: [] 30usd

 

and a text field thats named "price"

I need a client script that displays the selected checkbox'es info in a text field so my users can with ease see the price of the selected box. 

8 REPLIES 8

Sohail Khilji
Kilo Patron

Hi @asd22 ,

 

Can you share your requirement clearly ?

 


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect

?

ah ok. 

i have 3 check boxes, i want when i select 1 check box the text from that check box is displayed in my text field

Aman Kumar S
Kilo Patron

Hi @asd22 

There is no direct way to do this, you want to populate in real time or onsubmit?

You can write a logic something as shown below article:

https://www.servicenow.com/community/developer-forum/getting-field-names-from-selected-check-boxes-a...

If you want to go with onChange, you will have to have multiple onChange scripts for eachc heckbox and set the text value.

 

Best Regards
Aman Kumar