{"id":8635,"date":"2024-06-12T13:12:12","date_gmt":"2024-06-12T11:12:12","guid":{"rendered":"https:\/\/www.neuillysurmarne.fr\/?page_id=8635"},"modified":"2024-06-12T15:24:54","modified_gmt":"2024-06-12T13:24:54","slug":"test-formulaire-json","status":"publish","type":"page","link":"https:\/\/www.neuillysurmarne.fr\/zh\/test-formulaire-json\/","title":{"rendered":"test formulaire JSON"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"8635\" class=\"elementor elementor-8635\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-105d64c e-flex e-con-boxed e-con e-parent\" data-id=\"105d64c\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-2426c54 elementor-button-align-stretch elementor-widget elementor-widget-form\" data-id=\"2426c54\" data-element_type=\"widget\" data-e-type=\"widget\" id=\"myForm\" data-settings=\"{&quot;step_next_label&quot;:&quot;Suivant&quot;,&quot;step_previous_label&quot;:&quot;Pr\\u00e9c\\u00e9dent&quot;,&quot;button_width&quot;:&quot;100&quot;,&quot;step_type&quot;:&quot;number_text&quot;,&quot;step_icon_shape&quot;:&quot;circle&quot;}\" data-widget_type=\"form.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<form class=\"elementor-form\" method=\"post\" name=\"Nouveau formulaire\" aria-label=\"Nouveau formulaire\">\n\t\t\t<input type=\"hidden\" name=\"post_id\" value=\"8635\"\/>\n\t\t\t<input type=\"hidden\" name=\"form_id\" value=\"2426c54\"\/>\n\t\t\t<input type=\"hidden\" name=\"referer_title\" value=\"test formulaire JSON - Mairie de Neuilly-sur-Marne\" \/>\n\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"queried_id\" value=\"8635\"\/>\n\t\t\t\n\t\t\t<div class=\"elementor-form-fields-wrapper elementor-labels-above\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-field-type-text elementor-field-group elementor-column elementor-field-group-name elementor-col-100\">\n\t\t\t\t\t\t\t\t\t\t\t\t<label for=\"form-field-name\" class=\"elementor-field-label\">\n\t\t\t\t\t\t\t\tNom\t\t\t\t\t\t\t<\/label>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input size=\"1\" type=\"text\" name=\"form_fields[name]\" id=\"form-field-name\" class=\"elementor-field elementor-size-sm  elementor-field-textual\" placeholder=\"Nom\">\n\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<div class=\"elementor-field-type-text elementor-field-group elementor-column elementor-field-group-field_c467c8b elementor-col-100\">\n\t\t\t\t\t\t\t\t\t\t\t\t<label for=\"form-field-field_c467c8b\" class=\"elementor-field-label\">\n\t\t\t\t\t\t\t\tPr\u00e9nom\t\t\t\t\t\t\t<\/label>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input size=\"1\" type=\"text\" name=\"form_fields[field_c467c8b]\" id=\"form-field-field_c467c8b\" class=\"elementor-field elementor-size-sm  elementor-field-textual\" placeholder=\"Pr\u00e9nom\">\n\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<div class=\"elementor-field-type-upload elementor-field-group elementor-column elementor-field-group-field_eece6fa elementor-col-100\">\n\t\t\t\t\t\t\t<input type=\"file\" name=\"form_fields[field_eece6fa]\" id=\"form-field-field_eece6fa\" class=\"elementor-field elementor-size-sm  elementor-upload-field\">\n\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<div class=\"elementor-field-type-upload elementor-field-group elementor-column elementor-field-group-field_382fb33 elementor-col-100\">\n\t\t\t\t\t\t\t<input type=\"file\" name=\"form_fields[field_382fb33]\" id=\"form-field-field_382fb33\" class=\"elementor-field elementor-size-sm  elementor-upload-field\">\n\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<div class=\"elementor-field-type-upload elementor-field-group elementor-column elementor-field-group-field_3756c4e elementor-col-100\">\n\t\t\t\t\t\t\t<input type=\"file\" name=\"form_fields[field_3756c4e]\" id=\"form-field-field_3756c4e\" class=\"elementor-field elementor-size-sm  elementor-upload-field\">\n\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<div class=\"elementor-field-type-upload elementor-field-group elementor-column elementor-field-group-field_020eaa4 elementor-col-100\">\n\t\t\t\t\t\t\t\t\t\t\t\t<label for=\"form-field-field_020eaa4\" class=\"elementor-field-label\">\n\t\t\t\t\t\t\t\tFichier JSON\t\t\t\t\t\t\t<\/label>\n\t\t\t\t\t\t\t\t<input type=\"file\" name=\"form_fields[field_020eaa4]\" id=\"form-field-field_020eaa4\" class=\"elementor-field elementor-size-sm  elementor-upload-field\">\n\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<div class=\"elementor-field-group elementor-column elementor-field-type-submit elementor-col-100 e-form__buttons\">\n\t\t\t\t\t<button class=\"elementor-button elementor-size-sm\" type=\"submit\">\n\t\t\t\t\t\t<span class=\"elementor-button-content-wrapper\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-button-text\">Envoyer<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t<\/button>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/form>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-16e50c3 elementor-widget elementor-widget-html\" data-id=\"16e50c3\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t    <script>\n        document.querySelector('#myForm form').addEventListener('submit', function(event) {\n            event.preventDefault(); \/\/ Emp\u00eacher la soumission du formulaire\n\n            const form = event.target;\n            const formData = new FormData(form);\n\n            \/\/ Retirer les champs de fichier du FormData pour cr\u00e9er le JSON\n            formData.delete('form_fields[field_eece6fa]');\n            formData.delete('form_fields[field_382fb33]');\n            formData.delete('form_fields[field_3756c4e]');\n\n            \/\/ Cr\u00e9er un objet pour contenir les donn\u00e9es du formulaire\n            const formObject = {};\n            formData.forEach((value, key) => {\n                formObject[key] = value;\n            });\n\n            \/\/ Convertir l'objet en JSON\n            const jsonString = JSON.stringify(formObject);\n            const jsonBlob = new Blob([jsonString], { type: 'application\/json' });\n            const jsonFile = new File([jsonBlob], 'form_data.json', { type: 'application\/json' });\n\n            \/\/ Ajouter le fichier JSON au champ field_020eaa4\n            const field020eaa4 = document.getElementById('form-field-field_020eaa4');\n            const dataTransfer = new DataTransfer();\n            dataTransfer.items.add(jsonFile);\n            field020eaa4.files = dataTransfer.files;\n\n            \/\/ Introduire un d\u00e9lai avant la soumission\n            setTimeout(() => {\n                form.submit(); \/\/ Soumettre le formulaire apr\u00e8s le d\u00e9lai\n            }, 3000); \/\/ D\u00e9lai de 3 secondes\n        });\n    <\/script>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-8635","page","type-page","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>test formulaire JSON - Mairie de Neuilly-sur-Marne<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.neuillysurmarne.fr\/zh\/test-formulaire-json\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"test formulaire JSON - Mairie de Neuilly-sur-Marne\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.neuillysurmarne.fr\/zh\/test-formulaire-json\/\" \/>\n<meta property=\"og:site_name\" content=\"Mairie de Neuilly-sur-Marne\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ville.neuilly\" \/>\n<meta property=\"article:modified_time\" content=\"2024-06-12T13:24:54+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.neuillysurmarne.fr\\\/test-formulaire-json\\\/\",\"url\":\"https:\\\/\\\/www.neuillysurmarne.fr\\\/test-formulaire-json\\\/\",\"name\":\"test formulaire JSON - Mairie de Neuilly-sur-Marne\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.neuillysurmarne.fr\\\/es\\\/#website\"},\"datePublished\":\"2024-06-12T11:12:12+00:00\",\"dateModified\":\"2024-06-12T13:24:54+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.neuillysurmarne.fr\\\/test-formulaire-json\\\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.neuillysurmarne.fr\\\/test-formulaire-json\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.neuillysurmarne.fr\\\/test-formulaire-json\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/www.neuillysurmarne.fr\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"test formulaire JSON\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.neuillysurmarne.fr\\\/es\\\/#website\",\"url\":\"https:\\\/\\\/www.neuillysurmarne.fr\\\/es\\\/\",\"name\":\"Mairie de Neuilly-sur-Marne\",\"description\":\"BETA\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.neuillysurmarne.fr\\\/es\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.neuillysurmarne.fr\\\/es\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.neuillysurmarne.fr\\\/es\\\/#organization\",\"name\":\"Mairie de Neuilly-sur-Marne\",\"url\":\"https:\\\/\\\/www.neuillysurmarne.fr\\\/es\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\\\/\\\/www.neuillysurmarne.fr\\\/es\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.neuillysurmarne.fr\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/LOGO-NeuillysurMarne-blanc.png\",\"contentUrl\":\"https:\\\/\\\/www.neuillysurmarne.fr\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/LOGO-NeuillysurMarne-blanc.png\",\"width\":3308,\"height\":2586,\"caption\":\"Mairie de Neuilly-sur-Marne\"},\"image\":{\"@id\":\"https:\\\/\\\/www.neuillysurmarne.fr\\\/es\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/ville.neuilly\",\"https:\\\/\\\/www.instagram.com\\\/neuilly_marne\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/ville-de-neuilly-sur-marne\\\/\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCDdZ0TLrV8rfIqjBGvoeB5A\",\"https:\\\/\\\/www.tiktok.com\\\/@villedeneuillysurmarne\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"test formulaire JSON - Mairie de Neuilly-sur-Marne","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.neuillysurmarne.fr\/zh\/test-formulaire-json\/","og_locale":"zh_CN","og_type":"article","og_title":"test formulaire JSON - Mairie de Neuilly-sur-Marne","og_url":"https:\/\/www.neuillysurmarne.fr\/zh\/test-formulaire-json\/","og_site_name":"Mairie de Neuilly-sur-Marne","article_publisher":"https:\/\/www.facebook.com\/ville.neuilly","article_modified_time":"2024-06-12T13:24:54+00:00","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.neuillysurmarne.fr\/test-formulaire-json\/","url":"https:\/\/www.neuillysurmarne.fr\/test-formulaire-json\/","name":"test formulaire JSON - Mairie de Neuilly-sur-Marne","isPartOf":{"@id":"https:\/\/www.neuillysurmarne.fr\/es\/#website"},"datePublished":"2024-06-12T11:12:12+00:00","dateModified":"2024-06-12T13:24:54+00:00","breadcrumb":{"@id":"https:\/\/www.neuillysurmarne.fr\/test-formulaire-json\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.neuillysurmarne.fr\/test-formulaire-json\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.neuillysurmarne.fr\/test-formulaire-json\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.neuillysurmarne.fr\/"},{"@type":"ListItem","position":2,"name":"test formulaire JSON"}]},{"@type":"WebSite","@id":"https:\/\/www.neuillysurmarne.fr\/es\/#website","url":"https:\/\/www.neuillysurmarne.fr\/es\/","name":"\u9a6c\u6069\u6cb3\u7554\u8bb7\u4f0a\u5e02\u653f\u5385","description":"BETA","publisher":{"@id":"https:\/\/www.neuillysurmarne.fr\/es\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.neuillysurmarne.fr\/es\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":"Organization","@id":"https:\/\/www.neuillysurmarne.fr\/es\/#organization","name":"\u9a6c\u6069\u6cb3\u7554\u8bb7\u4f0a\u5e02\u653f\u5385","url":"https:\/\/www.neuillysurmarne.fr\/es\/","logo":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.neuillysurmarne.fr\/es\/#\/schema\/logo\/image\/","url":"https:\/\/www.neuillysurmarne.fr\/wp-content\/uploads\/2023\/10\/LOGO-NeuillysurMarne-blanc.png","contentUrl":"https:\/\/www.neuillysurmarne.fr\/wp-content\/uploads\/2023\/10\/LOGO-NeuillysurMarne-blanc.png","width":3308,"height":2586,"caption":"Mairie de Neuilly-sur-Marne"},"image":{"@id":"https:\/\/www.neuillysurmarne.fr\/es\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/ville.neuilly","https:\/\/www.instagram.com\/neuilly_marne\/","https:\/\/www.linkedin.com\/company\/ville-de-neuilly-sur-marne\/","https:\/\/www.youtube.com\/channel\/UCDdZ0TLrV8rfIqjBGvoeB5A","https:\/\/www.tiktok.com\/@villedeneuillysurmarne"]}]}},"_links":{"self":[{"href":"https:\/\/www.neuillysurmarne.fr\/zh\/wp-json\/wp\/v2\/pages\/8635","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.neuillysurmarne.fr\/zh\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.neuillysurmarne.fr\/zh\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.neuillysurmarne.fr\/zh\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.neuillysurmarne.fr\/zh\/wp-json\/wp\/v2\/comments?post=8635"}],"version-history":[{"count":49,"href":"https:\/\/www.neuillysurmarne.fr\/zh\/wp-json\/wp\/v2\/pages\/8635\/revisions"}],"predecessor-version":[{"id":8684,"href":"https:\/\/www.neuillysurmarne.fr\/zh\/wp-json\/wp\/v2\/pages\/8635\/revisions\/8684"}],"wp:attachment":[{"href":"https:\/\/www.neuillysurmarne.fr\/zh\/wp-json\/wp\/v2\/media?parent=8635"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}