Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

How to add fields validation before Printing - HTML5 Forms

Avatar

Avatar
Level 1
calvint88270830
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
calvint88270830
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

0 solutions
View profile
calvint88270830
Level 1

09-01-2018

Hi there,

I am quite new to HTML5 Design and I am wondering if anyone has run into this issue before.

I have a HTML5 form with some required fields which need to be validated after I click the Print button. I came up with the script below; however, it kept going to the loop even though I have entered the required data.  Using the HTTP Submit Button will go through all required fields but it does not bring up the Print Dialog.

FormsCal

if(xfa.host.appType == "HTML 5" or emplid.rawValue == null) then

xfa.host.messageBox("You must enter the required data to be able to print this form")

else

window.print()

endif

Thanks,

Calvin

Replies

Avatar

Avatar
Establish
MVP
Veena_Vikram
MVP

Likes

470 likes

Total Posts

1,039 posts

Correct Reply

121 solutions
Top badges earned
Establish
Coach
Contributor 2
Seeker
Ignite 5
View profile

Avatar
Establish
MVP
Veena_Vikram
MVP

Likes

470 likes

Total Posts

1,039 posts

Correct Reply

121 solutions
Top badges earned
Establish
Coach
Contributor 2
Seeker
Ignite 5
View profile
Veena_Vikram
MVP

09-01-2018

Understand your question is more about HTML5 and not AEM. May be this questions needs to be moved to the correct forum.

Avatar

Avatar
Level 1
calvint88270830
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
calvint88270830
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

0 solutions
View profile
calvint88270830
Level 1

09-01-2018

Hi,

Isn't HTML5 part of the AEM Designer? I can't seem to find a forum for AEM HTML5.

Avatar

Avatar
Establish
MVP
Veena_Vikram
MVP

Likes

470 likes

Total Posts

1,039 posts

Correct Reply

121 solutions
Top badges earned
Establish
Coach
Contributor 2
Seeker
Ignite 5
View profile

Avatar
Establish
MVP
Veena_Vikram
MVP

Likes

470 likes

Total Posts

1,039 posts

Correct Reply

121 solutions
Top badges earned
Establish
Coach
Contributor 2
Seeker
Ignite 5
View profile
Veena_Vikram
MVP

09-01-2018

You mean Adobe Experience Manager ?

Avatar

Avatar
Level 1
calvint88270830
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
calvint88270830
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

0 solutions
View profile
calvint88270830
Level 1

09-01-2018

Yes, that's correct.  Thanks!

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,408 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,408 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

09-01-2018

I believe you are trying to use AEM Forms - correct?

Avatar

Avatar
Level 1
calvint88270830
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
calvint88270830
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

0 solutions
View profile
calvint88270830
Level 1

09-01-2018

That is correct.

Avatar

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,157 likes

Total Posts

6,247 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,157 likes

Total Posts

6,247 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile
kautuk_sahni
Community Manager

10-01-2018

Moving this question to AEM forms!!