{"id":259,"date":"2017-08-06T21:08:08","date_gmt":"2017-08-06T19:08:08","guid":{"rendered":"https:\/\/asdw.de\/?p=259\/"},"modified":"2017-08-06T21:12:08","modified_gmt":"2017-08-06T19:12:08","slug":"save-the-data-of-a-scriptcase-form-via-ajax-event-or-php","status":"publish","type":"post","link":"https:\/\/asdw.de\/en\/save-the-data-of-a-scriptcase-form-via-ajax-event-or-php\/","title":{"rendered":"Save the data of a Scriptcase form via Ajax Event or PHP"},"content":{"rendered":"<h2>Save the content of a Scriptcase Form within an event<\/h2>\n<p>Sometimes it is necessary to save the content of a Scriptcase form without using the Update or Insert button.<\/p>\n<p>Create a small Javascript method in the Scriptcase Form:<\/p>\n<p>Programming &gt; Javascript Methods &gt; New Method<\/p>\n<p>The name of that method in our sample is: \u00a0&#8216;speichere&#8217;<\/p>\n<p>The code of the method is only one line:<\/p>\n<pre class=\"\">nm_atualiza ('alterar');<\/pre>\n<h3>Save when the user exits a field<\/h3>\n<p>To save the content use the Ajax-event OnBlur or OnChange.<\/p>\n<p>Sample: Save the data of the form when the user exits the field CityName:<\/p>\n<p><a href=\"https:\/\/asdw.de\/wp-content\/uploads\/2017\/08\/scriptcase_save_form_onBlur.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-246\" src=\"https:\/\/asdw.de\/wp-content\/uploads\/2017\/08\/scriptcase_save_form_onBlur.jpg\" alt=\"From Speichern bei einem Ereignis\" width=\"809\" height=\"437\" srcset=\"https:\/\/asdw.de\/wp-content\/uploads\/2017\/08\/scriptcase_save_form_onBlur.jpg 809w, https:\/\/asdw.de\/wp-content\/uploads\/2017\/08\/scriptcase_save_form_onBlur-300x162.jpg 300w, https:\/\/asdw.de\/wp-content\/uploads\/2017\/08\/scriptcase_save_form_onBlur-768x415.jpg 768w, https:\/\/asdw.de\/wp-content\/uploads\/2017\/08\/scriptcase_save_form_onBlur-600x324.jpg 600w, https:\/\/asdw.de\/wp-content\/uploads\/2017\/08\/scriptcase_save_form_onBlur-100x54.jpg 100w, https:\/\/asdw.de\/wp-content\/uploads\/2017\/08\/scriptcase_save_form_onBlur-150x81.jpg 150w, https:\/\/asdw.de\/wp-content\/uploads\/2017\/08\/scriptcase_save_form_onBlur-200x108.jpg 200w, https:\/\/asdw.de\/wp-content\/uploads\/2017\/08\/scriptcase_save_form_onBlur-450x243.jpg 450w\" sizes=\"(max-width: 809px) 100vw, 809px\" \/><\/a><\/p>\n<h3>Via PHP Code<\/h3>\n<p>The Javascript method can also be called from PHP code to save the data.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Save the content of a Scriptcase Form within an event Sometimes it is necessary to save the content of a Scriptcase form without using the Update or Insert button. Create a small Javascript method in the Scriptcase Form: Programming &gt;<span class=\"ellipsis\">&hellip;<\/span><\/p>\n<div class=\"read-more\"><a href=\"https:\/\/asdw.de\/en\/save-the-data-of-a-scriptcase-form-via-ajax-event-or-php\/\">Read more &#8250;<\/a><\/div>\n<p><!-- end of .read-more --><\/p>\n","protected":false},"author":2,"featured_media":247,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[55],"tags":[81,82,57,59,50],"_links":{"self":[{"href":"https:\/\/asdw.de\/en\/wp-json\/wp\/v2\/posts\/259"}],"collection":[{"href":"https:\/\/asdw.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/asdw.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/asdw.de\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/asdw.de\/en\/wp-json\/wp\/v2\/comments?post=259"}],"version-history":[{"count":1,"href":"https:\/\/asdw.de\/en\/wp-json\/wp\/v2\/posts\/259\/revisions"}],"predecessor-version":[{"id":260,"href":"https:\/\/asdw.de\/en\/wp-json\/wp\/v2\/posts\/259\/revisions\/260"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/asdw.de\/en\/wp-json\/wp\/v2\/media\/247"}],"wp:attachment":[{"href":"https:\/\/asdw.de\/en\/wp-json\/wp\/v2\/media?parent=259"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/asdw.de\/en\/wp-json\/wp\/v2\/categories?post=259"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/asdw.de\/en\/wp-json\/wp\/v2\/tags?post=259"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}