When i configure to "/content/forms/af/draftsave/demostoreandretrieveformdata.html" then the page redirects but the submit button in the form does not work. Can anyone help in this issue? | Community
Skip to main content
Level 3
September 22, 2023
Solved

When i configure to "/content/forms/af/draftsave/demostoreandretrieveformdata.html" then the page redirects but the submit button in the form does not work. Can anyone help in this issue?

  • September 22, 2023
  • 2 replies
  • 643 views

When i configure to "/content/forms/af/draftsave/demostoreandretrieveformdata.html" then the page redirects but the submit button in the form does not work. Can anyone help in this issue?

 

function validateAJAX(email, password) {
$.ajax({
url: '/bin/userTestDraftLogin',
method: 'POST',
data: {
email: email,
password: password
},
success: function (resultText) {

console.log("success");

window.location.href = "/content/forms/af/draftsave/demostoreandretrieveformdata.html";
},
error: function (jqXHR, exception) {
alert("Invalid email or password");
console.log('Error occured!!');
}
});
}

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by EstebanBustamante

Based on your workaround, it appears that the issue lies with the "wcmmode" type. Although you are encountering this behavior on your Author instance, it should not pose a problem because you won't be using this implementation in an Author instance. Therefore, I'm not sure if you really want to adjust your logic to make it work in an Author instance. 

 

By default, the mode prior to the URL changes will be retained. So, if you are testing with the "PREVIEW" mode selected, the "demostoreandretrieveformdata.html" page will load in "PREVIEW" mode, where I assume your button should function correctly. If, for some reason, your button requires a "DISABLED" mode, you can simply adjust your code to append the "DISABLED" mode only if the page is loaded on an author instance. However, I wouldn't recommend investing too much time in this, as it's unlikely to be accessed in an author instance.

 

Hope this helps

 

 

 

 

2 replies

MunmunBoAuthor
Level 3
September 22, 2023

The alternate solution i found is by adding wcmmode=disabled. Is this only way to see in publish mode.

  window.location.href = "/content/forms/af/draftsave/demostoreandretrieveformdata.html?wcmmode=disabled";

EstebanBustamante
Community Advisor and Adobe Champion
EstebanBustamanteCommunity Advisor and Adobe ChampionAccepted solution
Community Advisor and Adobe Champion
September 25, 2023

Based on your workaround, it appears that the issue lies with the "wcmmode" type. Although you are encountering this behavior on your Author instance, it should not pose a problem because you won't be using this implementation in an Author instance. Therefore, I'm not sure if you really want to adjust your logic to make it work in an Author instance. 

 

By default, the mode prior to the URL changes will be retained. So, if you are testing with the "PREVIEW" mode selected, the "demostoreandretrieveformdata.html" page will load in "PREVIEW" mode, where I assume your button should function correctly. If, for some reason, your button requires a "DISABLED" mode, you can simply adjust your code to append the "DISABLED" mode only if the page is loaded on an author instance. However, I wouldn't recommend investing too much time in this, as it's unlikely to be accessed in an author instance.

 

Hope this helps

 

 

 

 

Esteban Bustamante