This conversation has been locked due to inactivity. Please create a new post.
This conversation has been locked due to inactivity. Please create a new post.
Hi!
Can somebody please tell me what am I doing wrong and why the subform is not removed when I push "Delete position" button?
I am using command _Subformname.removeInstance(1);
Is this correct. Please help!
Solved! Go to Solution.
Views
Replies
Total Likes
Set the "min" property on each sub-form to "0" (zero) before doing a removeInstance and set the removeInstance arguement to "0" (zero). The attached contains the updated "click" event scripts as shown for Subform1, below.
// form1.Subform1.Subform1.Button1::click - (JavaScript, client)
form1.Subform1._Subform1.occur.min = "0";
form1.Subform1._Subform1.removeInstance(0);
Steve
Views
Replies
Total Likes
Set the "min" property on each sub-form to "0" (zero) before doing a removeInstance and set the removeInstance arguement to "0" (zero). The attached contains the updated "click" event scripts as shown for Subform1, below.
// form1.Subform1.Subform1.Button1::click - (JavaScript, client)
form1.Subform1._Subform1.occur.min = "0";
form1.Subform1._Subform1.removeInstance(0);
Steve
Views
Replies
Total Likes
Thank you very much for your answer. Practically my question is answered.
Meanwhile, I have changed my mind and I will copy the subform. What I don't know is how to remove the curent subform.
With my script, or even if I use your script, it always delete the position under it, not the current position.
To be more clear; how do I write in javascript remove_current_subform ?
Views
Replies
Total Likes
Once you remove a subform instance, do you want the subform instances that follow the deleted subform to move up the list or remain in place?
Views
Replies
Total Likes
I want to move up in place of the deleted subform.
Views
Replies
Total Likes
Can someone plese help
. Or it is not possible to do it?
Views
Replies
Total Likes
Use the following code in the delete button.
Subform1.instanceManager.removeInstance(this.parent.instanceIndex);
See the modified PDF attached.
Nith
Views
Replies
Total Likes
Thank for your answer but something is not right.
I am also using an image in the subform. Using the comand that $Nith$ seems that the subform is deleted but the image field is not updated.
From the attached file is we delete the second subform we should obtain in the first page 2 subforms containing 1st image.
Seems that this is not happening.
Please help.
Views
Replies
Total Likes
Am also struggling to dynamically find the current instance;
Just moved your static images to a separate subform and it works now. See the updated PDF.
Nith
Views
Replies
Total Likes
Man, thank you for your help but is still not working.
From attached file, second page, please delete position in the middle.
Maybe some staff member can help me.
Views
Replies
Total Likes
Just tried your form here and it seems to be working fine. Can you describe the steps to duplicate the issue?
Paul
Views
Replies
Total Likes
Please see my notes in second page of file notes.pdf. The pdf created in livecycle is dinamic-pdf.pdf
Views
Replies
Total Likes
OK I think I have it ......when you delete the instance you shoudl be using index and not indexInstance. Also I added a command to force a redraw of the screen .....this is the relayout command that you see that I have added to the delete script. Is this working as expected now?
Paul
Views
Replies
Total Likes
Thank you very much to all of you. Problem solved.
Is it too much to ask is pls somebody tell me count 1st position as 1 and not 0, and then the 2nd to be 2, the 3rd to be 3 and so on ...?
P.S. I accidentally set the correct answer as the second post. Please move the corect answer to the one avobe this post.
Views
Replies
Total Likes
What is being displayed is the index of the subform that is being displayed and that is 0 based. If you want to use it as an indicator to your user then simply add 1 to the expression.
Paul
Views
Replies
Total Likes
Thank you.
Views
Replies
Total Likes
Hi, I tried this example and when I remove an instance and then save, then reopen the pdf it did not stay removed. I've tried this in Adobe Reader 9.1 with extensions. I'm working on a similiar form with this situation and it's not working either. Can you help. Thanks
Views
Replies
Total Likes
BTW - my question is in regards to the test_SW sample.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies