Hi,
I have a form with several multiline text fields taking almost 2-3 pages..i do not need them always ..is there a way where i can have a kind of "OPEN" and "CLOSE" type of functionality to expand and collapse these text fields.
Thanks
Kapil
Views
Replies
Total Likes
JavaScript in a button click or maybe a check box:
TextField1.presence = "hidden";
TextField1.presence = "visible";
The sub form the items are in and all above it in the tree must have autosize on height.
Views
Replies
Total Likes
The best way is really the solution from Steve.
Important is that the subform content is flowed!! Then the system activate automatically the height autosize. And then the the hidden field don't need place.
In the field or checkbox which you decided if you need or not need the dynamic field you could use the following code in the CLICK oder CHANGE-Event:
//means the checkbox is activated
if(checkbox.rawValue ==1)
{
TextField1.presence = "visible";
}else
//means the checkbox is deactivated
{
TextField1.presence = "hidden";
// I would prefer to reset the hidden field
TextField1.rawValue = "null";
}
Please inform us when you want to use these fields, then we can make help with the condition.
You have the possibillity to change the field-height with: TextField.h = "0pt"; But I think this is not the best way for your problem.
Hopefully helpfull,
Mandy
Views
Replies
Total Likes
You need to use xfa.event.newText in the calculate event. rawValue will give the old value.
Views
Replies
Total Likes
@Steve:
I worked often with rawValue and have no problems with them. It always work correct.
Only by dropdown I use xfa.event.newText in the change-event with the switch statement.
Views
Replies
Total Likes
Here is a sample form with a collapsing text field.
With a button you can expand/collaps the field as you need.
Views
Replies
Total Likes
I meant to say change event per what your example was. I guess it is an intersting bit of info that rawValue will work in the change event of a checkbox. I'll stick to using xfa.event.newText to be consistent and ensure someone looking at my code to apply to something else doesn't have a problem.
Views
Replies
Total Likes
Views
Likes
Replies