Hidden field prepopulated from DB.

Avatar

Avatar
Validate 10
Level 2
1996_kcv
Level 2

Likes

2 likes

Total Posts

85 posts

Correct reply

0 solutions
Top badges earned
Validate 10
Validate 1
Boost 1
View profile

Avatar
Validate 10
Level 2
1996_kcv
Level 2

Likes

2 likes

Total Posts

85 posts

Correct reply

0 solutions
Top badges earned
Validate 10
Validate 1
Boost 1
View profile
1996_kcv
Level 2

29-09-2011

 

When the form is rendered , I have a text field that is Visible but wrapped in Hidden Subform. You cannot see it unitl you click of the button; Subform is Visible and you can enter data in the field. Works fine.

Can someone explain what happens when this field is prepopulated from database. The Subform that hold field is hidden. Is it going to show data when the form is rendered or you have to click on the button to see it?

Thank you,

View Entire Topic

Avatar

Avatar
Give Back 3
Level 2
past-tense
Level 2

Likes

9 likes

Total Posts

85 posts

Correct reply

10 solutions
Top badges earned
Give Back 3
Give Back
Validate 1
Boost 5
Boost 3
View profile

Avatar
Give Back 3
Level 2
past-tense
Level 2

Likes

9 likes

Total Posts

85 posts

Correct reply

10 solutions
Top badges earned
Give Back 3
Give Back
Validate 1
Boost 5
Boost 3
View profile
past-tense
Level 2

29-09-2011

Hi there,

When you populate the form from the database, visibility is never affected. Anything that is visible stays visible... anything hidden stays hidden.

What you can do is use a little formcalc to check if the field has a value, and if so, show the parent subform. This solution assumes that you don't have a hide button. If you do, you should change the hide/show buttons to a single checkbox, then check the checkbox 'srawvalue to see what state of visibility the subform should use.

code (put in the field in the hidden subform... under it's layout:ready event):

 

if (HasValue($)) then

     $.parent.presence = "visible"

endif