I’m trying to get the value of a form field on submit using jQuery. However when I try to alert it, it’s shows up as undefined, with text in.
var title=jQuery('#fields[field_4f52672267672]').val();
alert(title);
It’s got a funny ID though because I’m using a form plugin to create my form. When I inspect the element it simply shows the value attribute with no value beside it, even when it contains text. Can anyone explain what is going on please?
I’ve attached a screenshot of the field inspected with chrome’s inspector panel.

Into selectors you have to escape with 2 backslashes.