Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

Repeating User input (such as name and date) on each page automatically

Avatar

Former Community Member
Is there a way of having the information provided by the user on one page, such as name and date, automatically repeated on separate pages (perhaps as a header/footer.) The input would be via Reader only.



I have an application form of four pages, after the first page there is no direct unique evidence linking the remaining pages to the first.



Basically I want each page when printed to have an identifier, so that in the event of the pages getting mixed up, they can be put back together.



Any advice gratefully accepted
4 Replies

Avatar

Former Community Member
You can put page numbers on the master page so it will say x of y. Or as you suggest ...simply put the fields you want on the Master page and they will appear on each page that is created.

Avatar

Former Community Member
Thanks for the reply Paul.



What you say will work, but what I want is for the information on Page one from the Name and Date field to appear on the remaining pages in a different position and a much smaller point size, just as a reference to associate them with the first.



Such as, the first two questions at the top left of page 1 are Name and Date of birth, size: 10pt & bold. That info then re-appears at the bottom right of pages 2,3 & 4, point size 6 and normal.

Avatar

Former Community Member
Hi,

you can sole your problem with many way...

- You can use Global binding, so user nter data one time and every field with the same name automaticaly get the same value.



- You can use some Javascritp to obtain similar effects (more complicated but more fexible):



Create a Js Object (name it Global for Example).

Create some variables, i.e.: var field1;



Place one field in master pages and in their initialize event use the statement below:



Global.field1 = this;



In this way you obtayn a refernce that you can use everywhere in your form.

For example you can write: Global.field1.rawValue = "Hello word";



I hope this helps :-)



Bye.

Roberto.

(sorry for my poor english);

Avatar

Former Community Member
Many thanks Roberto, the 'Global binding' solved the problem.



But I'll have a go using the other options, just to see how they work.



Thanks again



Sean