codedance / jquery.AreYouSure

A light-weight jQuery "dirty forms" Plugin - it monitors html forms and alerts users to unsaved changes if they attempt to close the browser or navigate away from the page. (Are you sure?)
508 stars 145 forks source link

Fields not recognized #115

Open davidmackhello opened 7 years ago

davidmackhello commented 7 years ago

Apologize if this is an issue unrelated to AYS that I'm just not seeing:

For some reason AreYouSure isn't recognizing all the fields in my form, which loads as shown in the HTML example below. In this example, any changes in the id="title" or the id="slug" inputs trigger the form as dirty. However, the other two inputs shown here (one with class "catfield" and the other with class "bulletfield") are not being recognized by AreYouSure.

While there is some javascript that modifies some of these elements - even before any JS is triggered, when I simply load the page and change the value in any of the "catfield" or "bulletfield" inputs and navigate away, I get no warning.

I'm wondering if this has anything to do with how I have Bootstrap rows/containers set up in my form? Any insight would be greatly appreciated. Also - the top of my HTML head is getting clipped in the example below, but I am running JQuery 3.1.0.

`

``` Shopping List Generator

Startup Referral Form Builder

Use this tool to generate a shopping list/referral form that you can customize for a referral partner. Please complete and save all fields before submitting.


e.g. "USG Corporation" or "CSC Class 3"
For admin use only - should be unique and contain no spaces, e.g. "usg" or "class-4"
These are the instructions your referral partner will see.

Add category

Add bullet


` ```