1 Reply Latest reply on Jun 18, 2010 2:52 AM by try67

    Copy user selected image from imagefield to other imagefields

    jeff.johnson

      I have a form with 20 pages in it.  And on each of those 20 pages is an imagefield.  I want a user to be able to select any one of the imagefields and then select an image to go in to it and them copy that image to all of the other imagefields.  I can't get the imagefield image to copy over.  Here's my code so far.

       

      if (!this.value.image.isNull) {

           this.parent.TextField1.presence = "invisible";

       

       

           for (var i = 0; i < topmostSubform.nodes.length; i++) {

                var pName = topmostSubform.nodes.item(i).name;

       

                if (pName != "" && pName != null && String(pName).indexOf("_") == -1 && this.parent.name != pName) {

                     topmostSubform.nodes.item(i).TextField1.presence = "invisible";

                     topmostSubform.nodes.item(i).ImageField1.value.image = this.value.image;

                }

           }

      }

      Thanks