Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

User has to click multiple times, its annoying!!

Avatar

Level 4

Hello

I have placed a TIME field on the Header part, I also placed a PATTERN (all 4, like Display, Edit, Validation, Data) as HH:MM:SS and checked the check box of VALIDATION ERROR with my own text message as "Either entered time is invalid or wrong format, pls. fix it", well.

We have 5 pages form.

Now, if user enters a invalid/wrong format data on this TIME field, Adobe is throwing 5 times Warning popup bcz there are 5 pages and being header object, pls. let us know

1) How can I supress this annoying thing that 5 times warnng popoup, we need only 1 time alert/warn/error popup but we need to have it on header area, we need format pattern. Any JS pls. or any settings I need to do?

DATE TIME.jpg

Thank you

1 Accepted Solution

Avatar

Correct answer by
Level 10

well you my_text object is probably in your header and your date is in the form, so you have to give the reference_syntax to be able to access to your my_text object

You probably put your my_text object inside the master_page

To be able to access your master_page you must have this reference_syntax depending on your global form name at the top of the hierarchy

xfa.resolveNode("form1.pageSet.Page1.my_text").rawValue = this.rawValue;

form1 is the global form at the top of the hierarchy

pageSet is the object that contains all of the master pages

and Page1 is the name of the master page

View solution in original post

9 Replies

Avatar

Level 10

why dont you put your datefield outside of header... put it in your page... and change the value of a label that would be in the header of each page

Avatar

Level 4

Thank you. Sorry, I didn't get you.

My impression is: If I want to see/get an object (example, Logo. In my case its DATE field) on each single page, I must to place it on header part only so that it will come on each single page

My requirement: I need this DATE field on each single page, and bcz of redenency guidelines we don't want to put individually on each single page

Regards

Avatar

Level 10

As I understand you want a date to be shown on each page in the header... and because of you validation it gives you a message for each date field you have.. that is why you are having the message repeatedly.. I think so anyway

So you can put the datefield somewhere else in your form...

Put a label instead of a datefield in the header...

When you change the datefield value, give its value to the label in the header, so that way you have your date on each page without having the message poping up for each page

Avatar

Level 4

Ah, Thank you very much, yes, you understood my requirement well, its correct

By chance if anybody has time, pls. eloborate this solution step wise (if there is any JS, pls. provide me a snippet), actually I am a newbie to LC, otherwise, my questions,

1) When he said as LABEL, I guess, I need to pick TEXTfrom object library

2) Then, I need to place this on the header part...and I will name it as my_text

3) I need place a DATE field on the form page area/body area and I will name it as my_date

4) I need to write a JS on CHANGE event of this DATE field in such a way that, I need to assign/pass the user selected DATE value to the TEXT on the header part

5) If, so, pls. provide me a JS code snippet for assgning the DATE value to TEXT object, is somethig like below

  

Regards

Avatar

Level 10

put it in the exit event, this way you will always trigger the event

the change event only applies if there's already a value, if it's null and you change it, it won't trigger the change event

Avatar

Level 4

Thank you, just want to double check that, pls. advise me my approach (steps 1 to 5) is correct right, including JS ( my_text.rawValue = this.rawValue ) is correct right?

Regards

Avatar

Correct answer by
Level 10

well you my_text object is probably in your header and your date is in the form, so you have to give the reference_syntax to be able to access to your my_text object

You probably put your my_text object inside the master_page

To be able to access your master_page you must have this reference_syntax depending on your global form name at the top of the hierarchy

xfa.resolveNode("form1.pageSet.Page1.my_text").rawValue = this.rawValue;

form1 is the global form at the top of the hierarchy

pageSet is the object that contains all of the master pages

and Page1 is the name of the master page