on 01-25-2011 1:05 PM
In the form, there are 190+ fields, grouped nad divided into different sections. We have section(subform) and field(UI Element) configurations in which we need to make Form ui elements invisible based on section/Fields.
eg. < Code Snippet>
if(SectionsList<i> == <SectionName1>)
{
Page1.Section1.Field1.presence = "hidden";
Page1.Section1.Field2.p1esence = "hidden";
<.. rest of fields>
}
if(SectionsList<i> == <SectionName2>)
{
Page2.Section2.Field1.presence = "hidden";
Page2.Section2.Field2.p1esence = "hidden";
<.. rest of fields>
}
Here we are using absolute path for the the ui elements which includes page numbers.
The requirement is whenever we make a section or a field invisible the form size should get resized.
e.g.let us say we suppress 2 sections occupying 3 pages of total 8 pages of the form, then the rendered form should have only 5 pages
There are two issues here:
1) When the UI elements of section are hidden, the section is not getting shrinked or resized
2) Let us say above issue gets resolved and section gets shrinked; how can we locate the UI element using script? Currently we have coded java script for hiding UI elements by giving absolute path of UI element i.e. for example Page1.Section1.Field1
Hi,
Make your subforms 'flowed' instead of 'Positioned'. Then the subform will shrink automatically when you hide any UI element within that subform. You can follow the same absolute path to locate the UI element, even if it is hidden in the subform.
Thanks & Regards,
Sanoosh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sanoosh,
Thanks for the reply.
Please note we have 190+ fields in 12+ pages. Wrapping each UI element in subform is tedious job and also the script used for providing dynamic hide/read only feature of the UI elements also has to be changed.
Let us know if there is alternative to this.
Let us say we go ahead with the suggested change.For thhis, we wanted to know, are you sure of this suggested solution will work without any issues or impact in any other way.
Thanks,
Ganga
Hi Ganga,
First of all this depends on the form heirarchy design.
I would design the dynamic & static fields in flowed subforms separately and set their presence at runtime, I do it all the time.
Also by doing so it will not reset form fields.
But the point to be noted is, when you wrap these fields in subforms make sure any scripts refering to these fields are also updated with the correct absolute path.
Cheers,
Sai
Hi Ganga,
Yes at the time of design itself I will have the fields for one entity in a subforms flowed.
and all these subforms into a large subform flowed. if there are some special fields they will be into a different subform.
with is you will have a freedom of manuplating any subsection and since all the subforms are flowed it will automatically wrap up.
In your case I dont find a reason to have a every single filed in one subform and is flowed unless your form is something like a single column / pillar like Qutub minar.
If you can send me your xdp file, i can fix the design issue and can check whats resetting your form data.
Cheers,
Sai
Sai,
Thanks for your response.
I have tried the approach suggested by you guys i.e wrap each UI element in subform and set the Content to Flowed.
All these UI elements-forms are wrapped in another subform. When wrapper subform Content is changed from Positioned to Flowed; the alignment of UI elements goes off..in your words it becomes single column / pillar.
Please help me in this.
Regards,
Ganga
Hi,
Thanks for response.
Just reiterating the requirement for clarity: The requirement is let us say, for example; there are 4 fields in the form A, B, C, and D. If UI element B is hidden in the form, then all visible elements should get realigned i.e. C should take position of B and D should take position of C.
Please let us know if this can be achieved.
Regards,
Ganga
Hi Ganga,
replace the below xml code in a xml source code of a test form in ADLC.
I have done a design where 4 different parts 2 static, 2 dyanmic with fields.
As you requested fields flow automatically based on their value.
yes this is possible, i have built a sample form for you on this send a test mail to my ID, I can reply with it.
cheers,
Sai
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.