Programatically disabling jQuery client validation in ASP.NET MVC - javascript

I am using the jQuery MVC validation library for ASP.NET MVC, which is working fine.
However, on my form I have a 'Cancel' and a 'Save' button, both of which I want to submit the form back to the server.
However, if the user clicks 'Cancel' I need to disable the client side validation so that the user doesn't get prompted to complete required fields before they can cancel!
Any pointers would be appreciated!
Thanks.

I found a solution if you still have the same problem : step by step problem with validation on "back" button
Hope this helps!

So, when the user clicks cancel, what exactly you are expecting to happen? If you want to just redirect to a different page, then make sure the "cancel" button type is not submit and onclick of the cancel button, redirect to a different page. Button click will not validate the fields if it is not of submit type.

Related

Ninja Forms - regenerate the form after submission or by a button click event

does anyone have any advice on how I may go about regenerating a Ninja form after successful submission or by a button click event?
To explain, I am using a ninja form in a popup/modal. The modal is displayed and form appears when a user clicks on 'enquiry' button.
Each time a user clicks to open the modal popup containing the form I would like the form to be reset/regenerated instead of showing the success message from a previous submission.
I have tried using CSS to hide the success message and show the form whenever someone clicks the enquiry button. Whilst this displays the form fine, the submit button doesn't seem to work in the same fashion - it still sends mail but it doesn't show the 'processing' message.
Anyone got any advice on a solution I could use?
Thanks in advance!
You should be able to edit a setting in the form editor that handles that:
Advanced > Display Settings > Clear successfully completed form

HTTP POST fill Form - objective C

I know if you have a web view you can click a button through code like this
[self.webView stringByEvaluatingJavaScriptFromString:#"document.getElementsByName('GL')[0].click()"];
But if you fill out a form with a POST to a website, not with a UIWebView, then I how can you submit the form with a POST, or can you not do this? Or is there another way to submit the form?
Thanks for the help :)
from your question it seems that you want to click the submit button to submit the form .
you can do this using something like this:
function{
document. getElementById("submit"). click();
}
This will click the submit button like manually clicking the submit button regardless of the get or post method . Hope this helps.

How to do a full refresh (submit form) per CSJS in XPages

I need to submit a form with full refresh per CSJS in an event.
I know the solution to click the submit button. But is there a way to do it directly with JavaScript on client?
Thank you!
My workaround is to place a button with SSJS in a hidden div and then triggering it via CSJS. The button may do whatever you want, e.g. submit the form (save the datasource).
The cleaner approach would be to set the $$xspsubmitid with CSJS and then submitting the form. A possible way is described here: http://xpages.info/XPagesHome.nsf/Entry.xsp?documentId=88065536729EA065852578CB0066ADEC

Adobe Livecycle - form submit occurring before field exit

My office is working with LiveCycle ES4 and I'm kinda new to it. I have a form that contains some custom validation javascript which gets called in the submit event of a submit button, which works fine. The form is deployed in Livecycle Workbench, which replaces the in-form submit button with the workbench 'complete' button.
We're running into a problem where if a user enters data in one of the required fields, then clicks the Workbench Complete button, the exit event for that field doesn't fire, which means the rawValue is not set to the value the user entered. So when the validation runs as part of the submit event, it fails, even though the user has entered text in that field.
Is there some way to change this up so it shifts focus out of the current field when clicking the Workspace button?
There are ways the ensure that this does not happen.
One of the ways to do this is to place an if statement in the submit button code so that the form submission happens only when the rawValue of that field is populated. If the if statement does not evaluate to true, the submit code does not execute and you dont have to worry about this problem.
Also, If the field is not populated, your code can also set the focus to that field so that the user is automatically navigated to the field in question.
Hopefully this strategy helps. Please let me know if you have any other questions.
Thanks,
Armaghan.

costum redirect after submit

I have this form: http://lawb.co.il/HTMLPage.html
When someone click on the submit button ("שלח טופס" ) they are automaticaly redirected.
How can I prevent this action after clicking on the "שלח טופס" button, or that the page will redirect to a page that I choose and still I will get the information that people fill in the form?
The code is here http://jsfiddle.net/TCpkb/4/
Can you help me with it pleas?
You need to submit using AJAX and then redirect manually to your custom page. If you cannot use JavaScript, there is unfortunately no way to control the redirection if you let the user directly submit the HTML form.

Categories

Resources