I have text field called "Proveedor" like this:

        <td nowrap="true" valign="top" width="113px" class="ms-formlabel"><span class="ms-h3 ms-standardheader" id="Proveedor">
        <td valign="top" width="350px" class="ms-formbody">
        <!-- FieldName="Proveedor"
            <span dir="none"><input type="text" value="" maxlength="255" id="Proveedor_9ae60a83-59a5-4415-84d8-51ba698b8538_$TextField" title="Proveedor" style="ime-mode : " class="ms-long ms-spellcheck-true"><br></span>


That I want to do is to get value of that field, so I try:

var emailSpan = $("input[id='Proveedor']").val()

But I got undefined, someone knows what am I doing wrong? Regards

1 Answer 1


ID that you have used i.e Proveedor is the ID of td and not the input tag. That's why you are getting undefined. ID of your input tag is different.

Try below code:

var emailSpan = $("input[title='Proveedor']").val()


var emailSpan = $("input[id='Proveedor_9ae60a83-59a5-4415-84d8-51ba698b8538_$TextField']").val()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.