Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

LightForm Validation :S

Featured Replies

Hey,

 

mteam has been very helpful to me getting the site im working on: http://elliothesp.co.uk/pigandrat/ working with the tabs properly.

 

On the contact tab (which the page loads on) you can see there is a form - which is the LightForm.

 

The form sends and is functional, however the form validation isn't. For example, if only 2 characters are entered, it will pop up with a box saying "Please enter a name which is 3 characters long".

I did get this working, but then I was more interested with getting the tabs working, now it doesnt work and I just cant seem to sort it.

 

In my head I have this:

<link rel="stylesheet" type="text/css" href="css.css"/> [color="#FF0000"](The lightbox css is also in here[/color]
<script type="text/javascript" src="js/mootools.js"></script>
<script type="text/javascript" src="js/formcheck.js"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script> [color="#FF0000"]for the jQuery coin slider[/color]
<script type="text/javascript" src="coin-slider.min.js"></script>
</script>
<script type="text/javascript"> 
jQuery.noConflict();
jQuery(document).ready(function () { 
jQuery('li.nav ').click(function() {
	var panelmatch = jQuery(this).children().attr('href');
	jQuery('.panel').hide();
	jQuery(panelmatch).fadeIn('slow');
	return false;
	});


	jQuery('#coin-slider').coinslider();
});

</script>
<script type="text/javascript" src="js/niceforms.js"></script>

 

I cant see anything wrong with that lot?

 

Then, in the contact panel I have this:

 

<?php include 'contact.php'; ?>

 

This must work (as it appears), but its just the form validation wont! :(

 

Can anyone suggest any reasons why it isnt? Im not that amazing with php

I think this should work

 

<link rel="stylesheet" type="text/css" href="css.css"/>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript" src="js/mootools.js"></script>
<script type="text/javascript" src="coin-slider.min.js"></script>
<script type="text/javascript" src="js/formcheck.js"></script>
<script type="text/javascript" src="js/niceforms.js"></script>
<script type="text/javascript"> 
( function($) {
$(document).ready(function () { 
$('li.nav ').click(function() {
	var panelmatch = jQuery(this).children().attr('href');
	$('.panel').hide();
	$(panelmatch).fadeIn('slow');
	return false;
	});


	$('#coin-slider').coinslider();
});
} ) ( jQuery );
</script>
<script type="text/javascript"> 
window.addEvent('domready', function(){check = new FormCheck('third', {
	display : {
		fadeDuration : 500,
		errorsLocation : 1,
		indicateErrors : 1,
		showErrors : 1,

	}
})});
</script>

 

 

and remove position:relative; from .panelholder

  • Author

Haha, Damn, mteam why can you just get everything I have wrong working!

 

Thank you so much... again!

 

Alhough, can you explain the position relative part and why it had to be removed?

Your tool tip is being absolutely positioned the script gets the position so it might get top:600px by having the containing div relative that will display it 600px down from the .panelholder not the top of the page

 

give it a try with position:relative; and you'll see what happens

 

in your niceform script I think you need to change the link to your image folder

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.