Menu icon Foundation
Abide Validation - How to prevent onsubmit JavaScript?

Hi together,

I'm using Foundations Abide Validation for forms, which works very well. However know i've a very special case and don't know how to solve this. I want to use the Abide Validation on the Typo3 felogin form, which is a login form for frontend users.

The problem is, that this form already executes some onsubmit JavaScript when the submit button is clicked. This onsubmit stuff is required by Typo3 but i need it to be only executed if the Abide Validation has no errors.

So if i leave the fields empty and click submit, the Typo3 onsubmit stuff is executed, even if the fields are empty and the abide validation is showing the errors. How can i prevent this?

By the way this "novalidate=novalidate" stuff comes from Typo3.

I hope that someone can help me.

Thanks and have a nice day.

Tobi

<form action="/camba/" target="_top" method="post" onsubmit="return TYPO3FrontendLoginFormRsaEncryption.submitForm(this, TYPO3FrontendLoginFormRsaEncryptionPublicKeyUrl);; return true;" data-abide novalidate="novalidate">
	<div class="row">
      <div class="small-12 columns">
		<h4 class="h2 title">Login</h4>
        <p></p><div>Please enter your username and password.</div><p></p>
      </div>
    </div>
	
	<div class="row">
		<div class="small-12 columns">
			<label>Username <small>Required</small>
	        	<input type="text" name="user" value="" required>   
	        </label>
	        <small class="error">Required</small>	
		</div>
	</div>

	<div class="row">
		<div class="small-12 columns">
			<label>Password <small>Required</small>
	        <input type="password" name="pass" value="" required>   
	        </label>
	        <small class="error">Required</small>
		</div>
	</div>

	<div class="row">
		<div class="small-12 columns">
			<button class="button expand" type="submit">Login</button>
		</div>
	</div>

	<div class="felogin-hidden">
		<input type="hidden" name="logintype" value="login">
		<input type="hidden" name="pid" value="81">
		<input type="hidden" name="redirect_url" value="">
		<input type="hidden" name="tx_felogin_pi1[noredirect]" value="0">
		
	</div>
	
</form>

abidevalidationformjavascripttypo3felogin

Hi together,

I'm using Foundations Abide Validation for forms, which works very well. However know i've a very special case and don't know how to solve this. I want to use the Abide Validation on the Typo3 felogin form, which is a login form for frontend users.

The problem is, that this form already executes some onsubmit JavaScript when the submit button is clicked. This onsubmit stuff is required by Typo3 but i need it to be only executed if the Abide Validation has no errors.

So if i leave the fields empty and click submit, the Typo3 onsubmit stuff is executed, even if the fields are empty and the abide validation is showing the errors. How can i prevent this?

By the way this "novalidate=novalidate" stuff comes from Typo3.

I hope that someone can help me.

Thanks and have a nice day.

Tobi

<form action="/camba/" target="_top" method="post" onsubmit="return TYPO3FrontendLoginFormRsaEncryption.submitForm(this, TYPO3FrontendLoginFormRsaEncryptionPublicKeyUrl);; return true;" data-abide novalidate="novalidate">
	<div class="row">
      <div class="small-12 columns">
		<h4 class="h2 title">Login</h4>
        <p></p><div>Please enter your username and password.</div><p></p>
      </div>
    </div>
	
	<div class="row">
		<div class="small-12 columns">
			<label>Username <small>Required</small>
	        	<input type="text" name="user" value="" required>   
	        </label>
	        <small class="error">Required</small>	
		</div>
	</div>

	<div class="row">
		<div class="small-12 columns">
			<label>Password <small>Required</small>
	        <input type="password" name="pass" value="" required>   
	        </label>
	        <small class="error">Required</small>
		</div>
	</div>

	<div class="row">
		<div class="small-12 columns">
			<button class="button expand" type="submit">Login</button>
		</div>
	</div>

	<div class="felogin-hidden">
		<input type="hidden" name="logintype" value="login">
		<input type="hidden" name="pid" value="81">
		<input type="hidden" name="redirect_url" value="">
		<input type="hidden" name="tx_felogin_pi1[noredirect]" value="0">
		
	</div>
	
</form>