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

Form Submission Issue

Avatar

Avatar
Validate 1
Level 3
sonalik77795449
Level 3

Likes

6 likes

Total Posts

37 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 3
sonalik77795449
Level 3

Likes

6 likes

Total Posts

37 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile
sonalik77795449
Level 3

01-11-2016

Hello,

We have a simple form with submit action and Start and End Configured for the form.

We migrated from 6.1 to 6.2 and this stuff works fine on 6.1

On Submit however,we get following error on browser console - 

forms.html:465 Uncaught ReferenceError: cq5forms_isEmpty is not defined(…) for a random field on the form.

Javascript Line - 

if (cq5forms_isEmpty(document.forms["_content_public_jcr_content_customertools_contactreppar_start"].elements["city"])) {cq5forms_showMsg('_content_public_jcr_content_customertools_contactreppar_start','city','Please complete the City field.'); return false; }

Error logs show the following - 

service/forms.html HTTP/1.1] com.day.cq.personalization.impl.TargetedContentManagerImpl Failed to generate teaser info

java.lang.NullPointerException: null

 com.day.cq.personalization.impl.TargetedContentManagerImpl JSONObject["allTeasers"] not found.

org.apache.sling.commons.json.JSONException: JSONObject["allTeasers"] not found.

Please help.Not sure what teasers json its referring to here since we have a simple form implementation.

Thanks,

Sonali.

Replies

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

01-11-2016

Are you using an Adaptive Form -- this does look strange as the error is related to personalization and you are not using that. 

Avatar

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,164 likes

Total Posts

6,273 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,164 likes

Total Posts

6,273 posts

Correct Reply

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

02-11-2016

Moving this post to AEM forms.

~kautuk

Avatar

Avatar
Validate 1
Level 3
sonalik77795449
Level 3

Likes

6 likes

Total Posts

37 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 3
sonalik77795449
Level 3

Likes

6 likes

Total Posts

37 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile
sonalik77795449
Level 3

02-11-2016

We are using the OOTB Form component.Attached is the image.

Avatar

Avatar
Ignite 5
Employee
workflowuser
Employee

Likes

135 likes

Total Posts

444 posts

Correct Reply

70 solutions
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Give Back 50
Give Back 5
View profile

Avatar
Ignite 5
Employee
workflowuser
Employee

Likes

135 likes

Total Posts

444 posts

Correct Reply

70 solutions
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Give Back 50
Give Back 5
View profile
workflowuser
Employee

02-11-2016

This is not AEM Forms component- this is AEM capability and hence this question needs to be moved out of AEM Forms forum

Avatar

Avatar
Validate 1
Level 3
sonalik77795449
Level 3

Likes

6 likes

Total Posts

37 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 3
sonalik77795449
Level 3

Likes

6 likes

Total Posts

37 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile
sonalik77795449
Level 3

02-11-2016

I figured the  (cq5forms_isEmpty) is gone when I disable clientvalidation(inside start node : clientvalidation=false)

My page however does not redirect as expected when I set the actionType to foundation/components/form/actions/mail ,works fine when actionType= foundation/components/form/actions/store.

It goes to page not found.Any other config I might be missing?

Avatar

Avatar
Level 1
bimmis57571263
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
bimmis57571263
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

0 solutions
View profile
bimmis57571263
Level 1

12-09-2017

Hi, Even I am facing this issue. As if I uncheck the client validation then this error doesnt comes up, But unchecking that restricts the jquery I have written on it.

Avatar

Avatar
Level 1
bimmis57571263
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
bimmis57571263
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

0 solutions
View profile
bimmis57571263
Level 1

14-09-2017

Hi,

I have resolved the issue. When we tick the client validation, submit button behave as type=button and when you uncheck it behaves as type= submit. So if you have unchecked the client validationit behaves as a submit and your custom reditrection doesnt work. So if you want it to work you need to restrict the behavior of submit by using event.preventDefault().

Thanks!!!!