Jump to content

+labelText+?


V

Recommended Posts

I'm not sure if this qualifies as php. I'm working on contact form with required fields and I don't know how to change the labelText to the input value. I tried codes like +Value+ or +Xvalue+ but they don't work. Is it even possible to change it?  :-\

 

part of the code is

 

$('.requiredField').each(function() {
		if(jQuery.trim($(this).val()) == '') {
			var labelText = $(this).prev('label').text();
			$(this).parent().append('<span class="error">You forgot to enter your '+labelText+'.</span>');
			hasError = true;

Link to comment
https://forums.phpfreaks.com/topic/201075-labeltext/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.