2 Replies Latest reply on Sep 17, 2013 6:51 PM by LAIHDT Dan

    Spawning pages from entries in a list box with entry text as title

    LAIHDT Dan Level 1

      The background: I have a form with a list box which a user can populate with their own text via a text box and an 'add' button. This works fine.
      I've just added a template page with different content and 'spawn' button. This also works fine.

      The task: What I want to be able to do is use the entries in the list box from page 1 to spawn the same number of pages as entries and also populate a field in each newly spawned page with the name of the corresponding entry (to act as a title).

      How do I go about coding this?

      Current spawn code:

      var t = this.templates;

      var T = t[0];

      var XO = T.spawn(this.numPages, false, false);

      for (var i=0; i<m; i++) T.spawn(this.numPages, false, false, XO);