title: Confirm dialog not working in rails from
body: <p>I am having large rails form when submit button is clicked the There should be js confirmation dialog box but in my case it is not i cant understand why ??</p>
  
  <pre><code>&lt;div class="body-unit"&gt;
    &lt;div id="tabs-2"&gt;
      &lt;h1&gt;Fill up your academic details&lt;/h1&gt;
      &lt;%= form_for @academic, url: user_dashboard_academic_creator_path , method: :post do |f| %&gt;
       &lt;% if @academic.errors.any? %&gt;
          &lt;div id="error_explanation"&gt;
            &lt;h2&gt;&lt;%= pluralize(@academic.errors.count, "error") %&gt; prohibited this candidate from being saved:&lt;/h2&gt;
            &lt;ul&gt;
            &lt;% @academic.errors.full_messages.each do |message| %&gt;
              &lt;li&gt;&lt;%= message %&gt;&lt;/li&gt;
            &lt;% end %&gt;
            &lt;/ul&gt;
          &lt;/div&gt;
         &lt;% end %&gt;
         &lt;p&gt;
                 &lt;%= f.label :tenth_roll %&gt;&lt;br&gt;
                 &lt;%= f.number_field :tenth_roll %&gt;
         &lt;/p&gt;
         &lt;p&gt;
                 &lt;%= f.label :tenth_board  %&gt;&lt;br/&gt;
                 &lt;%= f.text_field :tenth_board %&gt;
         &lt;/p&gt;
         &lt;p&gt;
                 &lt;%= f.label :tenth_year_pass %&gt;&lt;br/&gt;
                 &lt;%= f.text_field :tenth_year_pass %&gt;
         &lt;/p&gt;
         &lt;p&gt;
                 &lt;%= f.label :tenth_marks_percent  %&gt;&lt;br/&gt;
                 &lt;%= f.number_field :tenth_marks_percent %&gt;
         &lt;/p&gt;
         &lt;p&gt;
                 &lt;%= f.label :hs_roll %&gt;&lt;br&gt;
                 &lt;%= f.number_field :hs_roll %&gt;
         &lt;/p&gt;
         &lt;p&gt;
                 &lt;%= f.label :hs_board  %&gt;&lt;br/&gt;
                 &lt;%= f.text_field :hs_board %&gt;
         &lt;/p&gt;
         &lt;p&gt;
                 &lt;%= f.label :hs_year_pass %&gt;&lt;br/&gt;
                 &lt;%= f.text_field :hs_year_pass %&gt;
         &lt;/p&gt;
         &lt;p&gt;
                 &lt;%= f.label :hs_marks_percent  %&gt;&lt;br/&gt;
                 &lt;%= f.number_field :hs_marks_percent %&gt;
         &lt;/p&gt;
         &lt;p&gt;
                 &lt;%= f.label "Stream" %&gt;
                 &lt;%= select("academic", "subject_streams_id", SubjectStream.all.collect {|c| [c.subject_stream, c.id]}) %&gt;
  
         &lt;/p&gt;
         &lt;p&gt; &lt;h3&gt;12th/Higher Secondary Subjects&lt;/h3&gt;&lt;br&gt;
           Subject 1 - 8 compulsory &lt;/p&gt;
         &lt;p&gt;
                 &lt;%= f.label "Subject 1"   %&gt;&lt;br&gt;
                 &lt;%= f.text_field :sub1 , class: "sub-input" %&gt;&lt;br&gt;
                 &lt;%= f.label "Subject 1 Marks"   %&gt;&lt;br&gt;
                 &lt;%= f.number_field :sub1_marks , class: "sub-input" %&gt;&lt;br&gt;
         &lt;/p&gt;
         &lt;p&gt;
                 &lt;%= f.label "Subject 2"   %&gt;&lt;br&gt;
                 &lt;%= f.text_field :sub2 , class: "sub-input" %&gt;&lt;br&gt;
                 &lt;%= f.label "Subject 2 Marks"   %&gt;&lt;br&gt;
                 &lt;%= f.number_field :sub2_marks , class: "sub-input" %&gt;&lt;br&gt;
         &lt;/p&gt;
         &lt;/div&gt;
         &lt;div id="tabs-3"&gt;
         &lt;p&gt;
                 &lt;%= f.label "Subject 3"   %&gt;&lt;br&gt;
                 &lt;%= f.text_field :sub3 , class: "sub-input" %&gt;&lt;br&gt;
                 &lt;%= f.label "Subject 3 Marks"   %&gt;&lt;br&gt;
                 &lt;%= f.number_field :sub3_marks , class: "sub-input" %&gt;&lt;br&gt;
         &lt;/p&gt;
         &lt;p&gt;
                 &lt;%= f.label "Subject 4"   %&gt;&lt;br&gt;
                 &lt;%= f.text_field :sub4 , class: "sub-input" %&gt;&lt;br&gt;
                 &lt;%= f.label "Subject 4 Marks"   %&gt;&lt;br&gt;
                 &lt;%= f.number_field :sub4_marks , class: "sub-input" %&gt;&lt;br&gt;
         &lt;/p&gt;
         &lt;p&gt;
                 &lt;%= f.label "Subject 5"   %&gt;&lt;br&gt;
                 &lt;%= f.text_field :sub5 , class: "sub-input" %&gt;&lt;br&gt;
                 &lt;%= f.label "Subject 5 Marks"   %&gt;&lt;br&gt;
                 &lt;%= f.number_field :sub5_marks , class: "sub-input" %&gt;&lt;br&gt;
         &lt;/p&gt;
         &lt;p&gt;
                 &lt;%= f.label "Subject 6"   %&gt;&lt;br&gt;
                 &lt;%= f.text_field :sub6 , class: "sub-input" %&gt;&lt;br&gt;
                 &lt;%= f.label "Subject 6 Marks"   %&gt;&lt;br&gt;
                 &lt;%= f.number_field :sub6_marks , class: "sub-input" %&gt;&lt;br&gt;
         &lt;/p&gt;
         &lt;p&gt;
                 &lt;%= f.label "Subject 7"   %&gt;&lt;br&gt;
                 &lt;%= f.text_field :sub7 , class: "sub-input" %&gt;&lt;br&gt;
                 &lt;%= f.label "Subject 7 Marks"   %&gt;&lt;br&gt;
                 &lt;%= f.number_field :sub7_marks , class: "sub-input" %&gt;&lt;br&gt;
         &lt;/p&gt;
         &lt;p&gt;
                 &lt;%= f.label "Subject 8"   %&gt;&lt;br&gt;
                 &lt;%= f.text_field :sub8 , class: "sub-input" %&gt;&lt;br&gt;
                 &lt;%= f.label "Subject 8 Marks"   %&gt;&lt;br&gt;
                 &lt;%= f.number_field :sub8_marks , class: "sub-input" %&gt;&lt;br&gt;
         &lt;/p&gt;
         &lt;p&gt;
                 &lt;%= f.label "Subject 9"   %&gt;&lt;br&gt;
                 &lt;%= f.text_field :sub9 , class: "sub-input" %&gt;&lt;br&gt;
                 &lt;%= f.label "Subject 9 Marks"   %&gt;&lt;br&gt;
                 &lt;%= f.number_field :sub9_marks , class: "sub-input" %&gt;&lt;br&gt;
         &lt;/p&gt;
         &lt;p&gt;
                 &lt;%= f.label "Subject 10"   %&gt;&lt;br&gt;
                 &lt;%= f.text_field :sub10 , class: "sub-input" %&gt;&lt;br&gt;
                 &lt;%= f.label "Subject 10 Marks"   %&gt;&lt;br&gt;
                 &lt;%= f.number_field :sub10_marks , class: "sub-input" %&gt;&lt;br&gt;
         &lt;/p&gt;
  
         &lt;p&gt;&lt;%= f.submit "Submit", data: { confirm: "Are you sure data once submitted cat be changed?"}, class: "btn btn-primary btn-lg"  %&gt;&lt;/p&gt;
       &lt;% end %&gt;
     &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>please explain me why is it not working ? I have another page with where i have a form and its working there.
  you can check out the live here although it needs to login <a href="https://warm-refuge-6265.herokuapp.com" rel="nofollow">heroku link</a></p>