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

Question

Question

Use Single Line Field in Table to Show/Hide Section in Forms 9.1

asked on January 6, 2014

I have a simple form with one Single Line (A) field, one Table (one row, one column with a Single Line field (B)), and one Section.  I am able to show/hide this Section if I setup a Field Rule to hide it when the first Single Line (A) field is empty.  The issue arises when I want to use the Single Line (B) field from the Table in the same Field Rule to control when the Section shows/hides.  It allows me to create the rule but the rule does not work.  Is there a way to use a Field from a table to control when a section is shown/hidden?

0 0

Answer

APPROVED ANSWER
replied on January 7, 2014

There are a couple things going on here. First, there's an known issue with rules that prevents them from working if one of the fields is in a table or collection. Please see this forum post for more information and a workaround to this issue.

 

Using a table to get fields side-by-side can work in some situations and, if you weren't running in to the known issue, it'd probably be fine. Instead of using a table, you could try using a little bit of CSS to accomplish that, as Abby mentioned. Add a class to several fields, like "myClass" and then enter the following CSS rule on the CSS and JavaScript page:

.myClass {display: inline-block;}

If you go this route, you'll probably want to manually adjust field widths to ensure that they look exactly how you want them to. The instructions for that are also on that page. You can also check out this white paper about using CSS in Forms.

 

We certainly want to make it easier for users to create form layouts that meet their needs, and that's something we want to improve in future versions of Forms. Until then, these layouts are possible using CSS in conjunction with the Themes page. Please continue to give us feedback and use cases and let us know the places where we can improve.

0 0

Replies

replied on January 6, 2014

I've worked on Forms this way, however I am teaching a non-IT customer how to create Forms on the fly.  These customers can create nice looking reports in SSRS or Crystal without needing to know programming and I am hoping that LF Forms follows suit so these customers do not need their IT department involved to put two fields side by side.  It would be nice to see something like a grid pattern where the users can drag the fields around the form, thus providing an easier method for customizing their forms.

1 0
replied on January 7, 2014 Show version history

There are a couple things going on here. First, there's an known issue with rules that prevents them from working if one of the fields is in a table or collection. Please see this forum post for more information and a workaround to this issue.

 

Using a table to get fields side-by-side can work in some situations and, if you weren't running in to the known issue, it'd probably be fine. Instead of using a table, you could try using a little bit of CSS to accomplish that, as Abby mentioned. Add a class to several fields, like "myClass" and then enter the following CSS rule on the CSS and JavaScript page:

.myClass {display: inline-block;}

If you go this route, you'll probably want to manually adjust field widths to ensure that they look exactly how you want them to. The instructions for that are also on that page. You can also check out this white paper about using CSS in Forms.

 

We certainly want to make it easier for users to create form layouts that meet their needs, and that's something we want to improve in future versions of Forms. Until then, these layouts are possible using CSS in conjunction with the Themes page. Please continue to give us feedback and use cases and let us know the places where we can improve.

replied on January 7, 2014

That is a very interesting use case. I think some of our clients would like this as well (as well as myself). It's a bit annoying that a feature will work some of the time in only certain situations but not in all. If the rules area at least informed you that it would not work it would be better as at least an end user knows it is a limitation from the start. Frankly, Forms is seen by many customers as a low technical know-how tool to use for basic needs and is self contained for simplicity. 

 

 

If you really want to make this all work, you might want to consider making your own tool and menus for the client that create a XML file for them to import the BP into Forms. At this point you can insert the logic into the XML file and they are none the wiser. 

0 0
replied on January 6, 2014

That is a limitation of Forms 9.0 I am not sure if they fixed this in 9.1 or not. What version are you on? I recommend using Javascript to accomplish this task by making it so that on the field change, you change the display options of the section. It is likely the best and easiest way to go about it.

0 0
replied on January 6, 2014

I knew it was an issue in 9.0 but I was hoping it was fixed in 9.1.  It doesn't appear to be but hopefully by 9.2 they'll have a built-in solution.

0 0
replied on January 6, 2014

Table contains multiple rows, user input value may be different from each row, so Forms currently doesn't support use fields inside table to show/hide fields outside table.

 

@Beau, can you provide a use case when "Use Single Line Field in Table to Show/Hide Section" is needed?

1 0
replied on January 6, 2014

Table contains multiple rows, user input value may be different from each row, so Forms currently doesn't support use fields inside table to show/hide fields outside table.

 

@Beau, can you provide a use case when "Use Single Line Field in Table to Show/Hide Section" is needed?

replied on January 6, 2014

I have a table where a person enters First Name, Last Name, Employee Id, and Type of Request.  They are all single line fields except type of request, which is a drop-down, and the rows are not Repeatable.  They are in a table strictly to make the form look nicer and better utilize screen realestate. In this case I am wanting to show a different custom html detailing the restrictions of the Type of Request they choose and hide the custom html's for the ones they don't choose.  I understand I can move these fields outside of the table and it work, but having things like first and last name or beginning and end date side-by-side make the form easier for the user to fill out.  

 

It would be nice to be able to create tables for aesthetic reasons only that don't have repeatable rows but we can define how many columns/rows they have and then nest the fields in there.  Something like this in a single table:
 

They could then function like normal fields but give us more flexibility in how we design the overall look and feel of our forms.

0 0
replied on January 6, 2014

I think the answer lies in using the Table for aesthetic reasons as opposed to recurring reasons.  In this scenario I am wanting to have the fields be side by side, as opposed to one field per line as is required if we do not nest them in a table, strictly so it looks better on the form.  The ideal solution would be allow us to put fields next to each other on a form outside of a table.  If that isn't possible then to have another type of table where we can choose how many columns/rows are in it and we can then nest fields in those various cells.  This helps to better utilize real estate and eases in data entry as users are accustomed to seeing like fields side by side (e.g. first name next to last name, start date next to end date, City next to State next to Zip Code).   Here is a sample table to give a basic idea of what I am hoping to accomplish aesthetically while still having full functionality and access to the values of the fields:

 

If possible I'd still prefer to have the ability to put fields next to each other without the need of a table but at this point either one would make forms more functional.

0 0
replied on January 6, 2014

@Beau, thanks for the use case.

If for aesthetic reasons, you can use customized CSS to achieve the side by side layout.

Check out examples in the following Laserfiche Forms help documentation:

http://www.laserfiche.com/support/webhelp/laserficheforms/9.1/en-us/forms/#FormsCSS.htm%3FTocPath%3DCreating%20a%20Form%7C_____8

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

Sign in to reply to this post.