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

Question

Question

Forms: Field rules based on value in dropdown populated by lookup?

asked on February 7, 2019

Hi all,

My situation: I have a dropdown field on a form. It's populated by a lookup rule.

When I attempt to configure a field rule to show a different field based on the value selected from this dropdown, there are no values for me to select:

Am I forced to hard-code these values into the dropdown on the Layout tab?

Thanks,

Rob

0 0

Answer

SELECTED ANSWER
replied on February 8, 2019 Show version history

What version are you using?

One solution would be to populate a field with what you select form the first drop down. Use the formula in the field:

Then point your second lookup to this value instead of your first drop down. Of course, you would want to hide this field with Field Rules.

Another thing to try is to use javaScript to trigger a .change with a timeout. In other words .on('change', of the first drop down, trigger .change() with a setTimeout set for a fraction of a second like 250 or 500.

Hopefully one of these works for you!

 

2 0
replied on February 9, 2019

I was going to suggest the same thing. If the hidden field is a single line you can type your value in the field rule and bypass the empty drop down issue. The functions trigger all the necessary change events, so I’ve used this approach for similar things.

1 0
replied on February 12, 2019

@████████ and @████████, much appreciated! I ended up going with the hidden single line field. It's been a while since I've needed to implement something like this so it completely slipped my mind. There are too many possible outputs (and there will very likely be more in the future) for the JS route to be easily maintainable.

 

1 0
replied on February 12, 2019

Nice work!

0 0

Replies

replied on January 8, 2023

This issue has addressed with Forms 11 Update 3 for the classic form designer and new form designer.

You can either type in the input for a proper value or select from the dropdown list with the defined options:

Classic form designer:

New form designer:

You can see other changes of Forms 11 Update 3 from  https://support.laserfiche.com/kb/1014413/list-of-changes-for-laserfiche-forms-11-update-3 and get Forms 11 Update 3 from Laserfiche 11 package  https://support.laserfiche.com/kb/1014263/software-versions-and-fixes-included-in-the-laserfiche-11-download-package

1 0
replied on January 11, 2023

These are some fantastic upgrades, thank for putting that on my radar. 

Any idea where the "Added support for JavaScript." can be found in the new forms designer?

0 0
replied on January 13, 2023

You can find the JavaScript from following place:

You can read more for how to add JavaScript for the new form designer from You can read more from https://doc.laserfiche.com/laserfiche.documentation/11/administration/en-us/Default.htm#../Subsystems/Forms/Content/Javascript-and-CSS/JavaScript-in-the-Forms-Designer.htm

0 0
replied on January 13, 2023 Show version history

We have looked at this for a few days now. Is jQuery no longer an option? Or does it need to be loaded in each form? From what I see it still looks like jQuery just different ways to call the fields??

Thanks again for all the info!

0 0
replied on January 28, 2023

JQuery is no long an option, LFForms APIs provides different ways to find the fields.

0 0
replied on January 30, 2023 Show version history

@████████, so to be clear, the new style of Form designer is phasing out the use of jQuery? We use jQuery currently on MANY existing forms in production. What is the timeline for discontinuing the 'Classic' style of form designer? This will be a major undertaking to convert things over.

One other question. We will still be able to use JavaScript still in the new Forms designer, correct? It is much more clunky thing than jQuery but I believe we might be able to use it for the majority of our customizations.
 

0 0
replied on February 1, 2023

Yes, the new form designer doesn't support the use of JQuery currently. We will investigate how we can make it easier for customers to convert their classic forms with heavy customization using JQuery. 

Currently there is no timeline for discontinuing classic form designer, you can continue to use it. 

You can use JavaScript with the new form designer but if you want to interact with the fields, you need to use the LFForms APIs.

1 0
replied on February 9, 2019

I was going to suggest the same thing. If the hidden field is a single line you can type your value in the field rule and bypass the empty drop down issue. The functions trigger all the necessary change events, so I’ve used this approach for similar things.

replied on July 17, 2023

Hi, we improved dropdown controls to make it easier to configure rules/reports on Forms 11 Update 4.

You can see other changes from:

List of Changes for Laserfiche Forms 11 Update 4 - Knowledge Base

Get Forms 11 Update 4 from Laserfiche 11 package:

Software versions and fixes included in the Laserfiche 11 Download Package - Knowledge Base

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

Sign in to reply to this post.