You are viewing limited content. For full access, please sign in.

Question

Question

Set Text Field Value Based on Radio Button Value

asked on October 11

Hello!

Looking for some JavaScript assistance.  I have a radio button with three choices.  I have a separate text field that I want to populate with a 3 digit doc ID code depending on which radio button option is selected. 

Appreciate any help!

0 0

Answer

APPROVED ANSWER
replied on October 13

Hey Thomas, I don't think JS is necessary here. You can assign a value to a radio button, then use a regular expression to pull the value into a single line field.

 

Here's the RB field (variable as 'Radio_Button):

 

In the single line field, you just use the expression '=Radio_Button'

Selecting a radio button option will produce whatever is in the 'value assigned' of the radio button selected

1 0

Replies

replied on October 14

Hi Thomas,

I agree with Andrew that you just need a simple formula to get value from the radio button, Andrew shared a sample with the new form, I've also tested on classic form, it is working too.

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.