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

Question

Question

Populate a drop down box with a value using javascript

asked on December 1

Howdy howdy howdy!

 

I'm using the Modern Forms Designer, and I have a form that has a drop down box listing Departments (FieldId: 9).  When the form loads, it uses a lookup rule to access a table with a list of all the departments.  I have radio button (FieldId: 140) that asks if the user is completing on another employee's behalf (choices are Yes and No).  If the user selects "Yes", how do I display the value from another field (FieldId: 166) in the drop down box?  I typed up the following code, and nothing is happening.

 

0 0

Answer

SELECTED ANSWER
replied on December 2 Show version history

in your IF statement try this:

 

Let jDepartment = LFform.getFieldValues({fieldID: 166});
            LFForm.setFieldValues({ fieldId: 9}, { value: [jDepartment]});

1 0

Replies

replied on December 2

That worked!  Thank-you!

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

Sign in to reply to this post.