Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Visible condition for BizForm fields/Labels controls not appearing View modes: 
User avatar
Member
Member
esolutions - 10/25/2013 1:01:22 PM
   
Visible condition for BizForm fields/Labels controls not appearing
Hi,
I'm having a couple of issues with a BizForm I've created. The BizForm has two sections. I added two radio buttons with "Yes" and "No" values. What I want is when the user chooses "Yes" another section appears underneath.

I added the fields for the hidden section along with validation. All fields are required in this section.

The section also has a title and two subtitles. I added these as label controls becuase they needed to be hidden/unhidden as well depending on what the user chooses with the radio buttons.

My first issue is, I added a visible condition that when the radio button value = yes then display the field. I set this for ALL the fields in this section. The problem is, when I choose "No", the fields remain hidden which is correct but when I submit the form the validation for these hidden fields still fires.

The second issue is the labels I added for the sections are not appearing regardless if I have the visiblie condition set for them or not. I'm using a custom form layout.

I set the label up with the column name "CoAppLabel", Text, 100, allow empty value. The show on public form is checked off, the field caption is Co-Applicant or spouse Information" the form control is set to Label. There is no transformation. The label in the custom form layout is $$label:CoAppLabel$$.

So I'm not sure why the labels aren't appearing even without a visible condition set nor do I know how to turn the validation for the fields off when they are not visible.

User avatar
Kentico Support
Kentico Support
kentico_janh - 10/27/2013 8:59:02 AM
   
RE:Visible condition for BizForm fields/Labels controls not appearing
Hello,

1) Validation issue -> Please check those mandatory fields as allow empty values and set the regular expression instead -> so for not empty value use .+ expression

2) Hidden labels -> I am not sure I understand what should be the goal. Do you want to render a label if appropriate field is hidden or vice versa?

Best regards,
Jan Hermann

User avatar
Member
Member
esolutions - 10/28/2013 9:15:56 AM
   
RE:Visible condition for BizForm fields/Labels controls not appearing
1) That worked
2) the section where the fields are hidden/shown depending on if yes/no is selected looks as follows:

Section Title
Section Subtitle
hidden field 1 hidden field 2, etc

So, if the option selected for the radio button is "no" then Section Title and Section Subtitle need to be hidden. If the radio button is "yes" then Section Title and Section Subtitle need to be displayed. If plain text is used in the in the custom form layout they are giong to display regardless of what option is chosen. So, I thought I would use Labels to display these titles and use the same logic withe the Visible condition as I did with the fields. But regardless if I'm using the visible condition or not the text I placed in the "Field caption" is not displaying on the form.

User avatar
Member
Member
esolutions - 10/28/2013 9:53:54 AM
   
RE:Visible condition for BizForm fields/Labels controls not appearing
I figured it out. I was just using $$label:CoAppLabel$$ assuming that was all I needed. I also needed $$input:CoAppLabel$$ for the label to appear.

User avatar
Member
Member
mvandenberge-ncoi - 12/5/2013 3:40:03 AM
   
RE:Visible condition for BizForm fields/Labels controls not appearing
Hello,

I am experiencing the same problem (problem 1 from the original post), the problem is that I cannot allow it to be empty because it has to be filled in. I'll explain why.

In my form I have 2 radio buttons, 1 for email and 1 for phone number. When a person clicks the email button a text-box appears for them to fill in the email address, same goes for phone number. The problem is that if I turn on "allow empty values", people will be able to select a radio button and not fill in their email or phone number.

Am I able to turn off "allow empty values" and still work with a visible condition?

Best regards,
M van den Berge

User avatar
Kentico Support
Kentico Support
kentico_janh - 12/5/2013 4:35:45 AM
   
RE:Visible condition for BizForm fields/Labels controls not appearing
Hello,

The provided solution to the point one should work in your case as well:
1) Validation issue -> Please check those mandatory fields as allow empty values and set the regular expression instead -> so for not empty value use .+ expression

In your case for both of your text fields.

Best regards,
Jan Hermann