V Posted May 8, 2010 Share Posted May 8, 2010 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; Quote Link to comment Share on other sites More sharing options...
trq Posted May 8, 2010 Share Posted May 8, 2010 I'm not sure if this qualifies as php. Probably not considering its written in JavaScript. Quote Link to comment Share on other sites More sharing options...
V Posted May 8, 2010 Author Share Posted May 8, 2010 oh ok, I wasn't sure. I'll inquire a javascript forum for this one. thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.