Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Objects moving when script runs

Avatar

Level 1

So, it looks as though I need to get some help from the wonderful community

I have this form I'm creating to use for research progress reports.  It was requested that professors be able to add images to the form when submitting thier report.  I have almost finished putting together the PDF form, however, when I save the form and try to use it, some weird stuff happens to all my objects and I'm not quite sure why.

The idea is, when a professor wants to add an image, they specify how many images they need in a numerical field.  When exiting that field, the appropriate image fields populate underneith the task that they are trying to describe.  I used some code out of the "Creating Dynamic Forms with Adobe LiveCycle Designer" book that was given to me when I took the LiveCycle course.  Everything SEEMS to work great, but I notice that if I add an image that is larger than the content area, all my objects move around to what seems like random places.

I was wondering if anyone would be so kind as to take a look at my form and come up with some suggestions as to why this is happening.  Otherwise, I'm lost :?

The file is here --> http://www.okladot.state.ok.us/meetings/progress_report.pdf

Thank you for your time with this issue

4 Replies

Avatar

Level 7

It looks as though your image fields are hidden and scripted to reveal themselves when the number is inputted. Instead, I would suggest that a "visible" image field be contained in a repeating Subform where the Subform instances are set to zero by default and your script sets the instances to the number inputted (see the help on instance manager). This should give better predictable results. Besides, the way you have it set now, a user could add a photo and change their mind and if they reduce the number it simply hides the image--it is not gone and is still a part of the data. Probably not ideal.

Good luck!

Stephen

Avatar

Level 1

Thank you Stephen for the advice, it was very helpful   I have made the changes you suggested and it has greatly improved the performance of the form however the initial problem still persists in what seems like a much more controlled way.  The form itself is working just fine untill it reaches page 3, then that's when the form starts exploding and rearanging a few of the objects (but not nearly as bad as it was before I made the suggested changes).  I noticed this behavior happens as well when I add an image that has to scale down to fit the placeholder created.

I have re-uploaded the form to the link in the first post of this conversation

My other observation after making the suggested changes is that the setInstance script I used when exiting the "No. of images needed: >" field does not work in any other instance of the taskframe, only the first one.  I can only assume this is an issue when using the instanceManager, but i was not sure.  I would like to be able to add images to each individual task when needed.

Again, thank you for your help.

Frankus.

Avatar

Level 7

Your structure should be something like:

FlowableAllTasksSubform(containing all tasks)

     FlowableIndividualTaskSubform(multiple instances, each instance containing fields
     pertaining to an individual task, instances set to one, by default)

          YourVariousTaskRelatedFields

          SubformImageField(multiple instances, each containing an individual image field, set to
          zero by default)

               ImageField

Good luck

Stephen

PS. I was born in Edmond

PPS. Style your image field with a border, so folks know that it is there. S.

Avatar

Level 1

Thank you again for the advice.  Since updating my pdf structure and fine tuning the addInstance script, 96% of the form is working perfectly.  I really appreciate your help.

PS: Edmond eh?  It's a good place to live and it's getting bigger every day!  We recently (within the past few years) re-constructed the overpass at 150th at Broadway Extension.

PPS: You know, I was thinking about this yesterday.  I gave the image area a very very light shade of grey to help distinguish it from just a large space, but that wasn't working so well.  I wanted to keep from adding a box around it just for aesthetics, and have since added a default value to the text field underneith it saying "Click the space above to add an image.  Type it's caption here.".  I wanted to use a background watermark saying "click here to add image", but you can't do that in a flowing subform :?  I was also thinking of just placing an image in the image field with a watermark.  Maybe that would be a good way to go?