title: Problem jquery after load ajax gravity forms
body: <p>I use custom code in the snippet, then put the shortcut of snipped in filed html gravity forms.
  The custom calendar is played in first step form correctly, but when I click next then previous, the calendar is not displayed and I get this error:
  &quot;Cannot read properties of undefined (reading 'regional')&quot;</p>
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;!-- The Head tag is used to create a title of web page, CSS syntax for a web page, and helps in written a JavaScript code. --&gt;
  
          &lt;script src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js&quot;&gt;&lt;/script&gt;
          &lt;link href=&quot;https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.6.4/css/bootstrap-datepicker.standalone.min.css&quot; rel=&quot;stylesheet&quot; /&gt;
          &lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.6.4/js/bootstrap-datepicker.min.js&quot;&gt;&lt;/script&gt;
          &lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.6.4/locales/bootstrap-datepicker.nl.min.js&quot;&gt;&lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;div id=&quot;calendar&quot;&gt;&lt;/div&gt;
  
          &lt;script type=&quot;text/javascript&quot;&gt;
              $(document).ready(function () {
                  $(document).on(&quot;gform_post_render&quot;, function () {
                      addServiceListeners();
                  });
  
                  function addServiceListeners() {
                      $.datepicker.regional[&quot;fr&quot;] = {
                          closeText: &quot;Fermer&quot;,
                          prevText: &quot;Précédent&quot;,
                          nextText: &quot;Suivant&quot;,
                          currentText: &quot;Aujourd'hui&quot;,
                          monthNames: [&quot;janvier&quot;, &quot;février&quot;, &quot;mars&quot;, &quot;avril&quot;, &quot;mai&quot;, &quot;juin&quot;, &quot;juillet&quot;, &quot;août&quot;, &quot;septembre&quot;, &quot;octobre&quot;, &quot;novembre&quot;, &quot;décembre&quot;],
                          monthNamesShort: [&quot;janv.&quot;, &quot;févr.&quot;, &quot;mars&quot;, &quot;avr.&quot;, &quot;mai&quot;, &quot;juin&quot;, &quot;juil.&quot;, &quot;août&quot;, &quot;sept.&quot;, &quot;oct.&quot;, &quot;nov.&quot;, &quot;déc.&quot;],
                          dayNames: [&quot;dimanche&quot;, &quot;lundi&quot;, &quot;mardi&quot;, &quot;mercredi&quot;, &quot;jeudi&quot;, &quot;vendredi&quot;, &quot;samedi&quot;],
                          dayNamesShort: [&quot;dim.&quot;, &quot;lun.&quot;, &quot;mar.&quot;, &quot;mer.&quot;, &quot;jeu.&quot;, &quot;ven.&quot;, &quot;sam.&quot;],
                          dayNamesMin: [&quot;D&quot;, &quot;L&quot;, &quot;M&quot;, &quot;M&quot;, &quot;J&quot;, &quot;V&quot;, &quot;S&quot;],
                          weekHeader: &quot;Sem.&quot;,
                          dateFormat: &quot;dd/mm/yy&quot;,
                          firstDay: 1,
                          isRTL: false,
                          showMonthAfterYear: false,
                          yearSuffix: &quot;&quot;,
                      };
  
                      $.datepicker.setDefaults($.datepicker.regional[&quot;fr&quot;]);
  
                      $(&quot;#calendar&quot;).datepicker();
                      $(&quot;#calendar&quot;).on(&quot;change&quot;, function () {
                          var selected = $(this).val();
                          $(&quot;input#input_2_24&quot;).val(selected);
                      });
                  }
              });
          &lt;/script&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>