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!!');
}
});
}
Solved! Go to Solution.
Views
Replies
Total Likes
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
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";
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
Views
Likes
Replies
Views
Likes
Replies