# jQuery: How to reference field input NAMErather than ID

**URL:** <https://forum.kirupa.com/t/jquery-how-to-reference-field-input-namerather-than-id/329640>\
**Category:** web dev\
**Created:** [September 25, 2012, 10:40pm UTC](https://forum.kirupa.com/t/jquery-how-to-reference-field-input-namerather-than-id/329640 "2012-09-25T22:40:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pherank](https://avatars.discourse-cdn.com/v4/letter/p/4af34b/32.png) [@Pherank](https://forum.kirupa.com/u/Pherank)\
**Post date:** [September 25, 2012, 10:40pm UTC](https://forum.kirupa.com/t/jquery-how-to-reference-field-input-namerather-than-id/329640/1 "2012-09-25T22:40:41Z")

</div>

The jQuery Validate plugin can compare two fields using the ID like this:

```auto

confirm_email: {
                required: true,
                email: true,
                equalTo: "#email"
            },

```

But I need to reference the field NAME. What do I substitute for “#”?
