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

Question

Question

The LFForm.changeFieldOptions Function with "selected: true" Setting Doesn't Appear to Work for Drop-Down Fields

asked on October 30

Tested on Version 12.0.2503.10378
This is the example given in the help documentation:

LFForm.changeFieldOptions( { fieldId: 10 }, [{label: "Choice 4", value: "Choice_4", selected: true}, {label: "Choice 5"}], "add" );

I've been playing around with this, and it doesn't look like including the "selected: true" element works with drop-down fields.  It adds the value(s) to the drop-down, but does not select the value no matter what I do with my testing.

Is this a bug?

0 0

Answer

SELECTED ANSWER
replied on November 3

This is likely a bug, and I'll look into it. In the meantime use setFieldValues to set the value making sure to await the changeFieldOptions call prior to setting the value.

1 0
replied on November 3

Thank you @████████

0 0

Replies

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

Sign in to reply to this post.