{"id":4793,"date":"2026-03-01T12:21:58","date_gmt":"2026-03-01T12:21:58","guid":{"rendered":"https:\/\/madinah.se\/memlist-medlemssystem\/"},"modified":"2026-03-03T17:52:53","modified_gmt":"2026-03-03T17:52:53","slug":"register","status":"publish","type":"page","link":"https:\/\/madinah.se\/sv\/register\/","title":{"rendered":"Register"},"content":{"rendered":"<div data-elementor-type=\"wp-page\" data-elementor-id=\"4793\" class=\"elementor elementor-4793\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-10118cb7 e-flex e-con-boxed e-con e-parent\" data-id=\"10118cb7\" 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-5f836b9d elementor-widget elementor-widget-shortcode\" data-id=\"5f836b9d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\"><div class='container registeruser'>\n  \t\t\t\t<div class='row'>\n  \t\t\t\t\t<div class='col-md-12'>\n\t\t\t\t\t\t<iframe class='cstmcommoniframe responsive-iframe cwebcoregister' name='iframememlistregister' id='iframememlistregister' frameborder='0' src='https:\/\/SMFS.memlist.se\/register\/RzBz7ZgXkoPG'><\/iframe>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div><br><a class= 'cstm_color_white' href='https:\/\/madinah.se\/sv\/memlist-medlemssystem\/'>Mer om medlemssystemet<\/a><script>\n\twindow.onmessage = (event) => {\n\t\tlet newdataa = event.data[1];\n\t\t}\n\twindow.addEventListener('message', function(e) {\n\t    \/\/ Get the sent data\n\t    const data = JSON.parse(e.data[1]);\n\n\t\t\tconsole.log('message from child', data);\n\n\t\t\tif (data.height) {\n\t\t\t\tconst parsed_height = parseInt(data.height+'');\n\n\t\t\t\tif (parsed_height) {\n\t\t\t\t\tjQuery('.cstmcommoniframe').height(data.height);\n\t\t\t\t\tjQuery('.cstmcommoniframe').width('100%');\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tconsole.error('invalid height', parsed_height);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (data.action) {\n\t\t\t\tif (data.action === 'nextPage') {\n\t\t\t\t\t\/\/ scroll into view element with class registeruser\n\t\t\t\t\tconst el = document.querySelector('.registeruser');\n  \t\t\t\tif (el) {\n\t\t\t\t\t\tel.scrollIntoView({ behavior: 'smooth', block: 'start' });\n\t\t\t\t\t} \n\t\t\t\t\telse {\n\t\t\t\t\t\tconsole.error('element registeruser not found');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t});\n\t<\/script><style>\n\t.responsive-iframe.cwebcoregister {\n\t  position: relative;\n\t  left: 0;\n\t  right: 0;\n\t  width: 100%;\n\t  height: 320px;\n\t}\n\n\t.card.wizard-body {\n    \tbackground-color: yellow;\n\t}\n\n\t.cstmcommoniframe{width:100%;}\n\n\t<\/style><script>\n\twindow.addEventListener('message', function(e) {\n    \/\/ Get the sent data\n\n    const data = e.data;\n\n\n    const registration_message = data['1'];\n\n    const decoded_data = JSON.parse(registration_message); \/\/ If encoded the message in JSON before sending them, \n\n\t\tif ('redirect' in decoded_data) {\n\t\t\twindow.location.href = decoded_data.redirect;\n\t\t}\n\t\t\n\t\tif ('openbankid' in decoded_data) {\n\t\t  window.location.href = decoded_data.openbankid;\n    }\n\n    if('register' in decoded_data)\n    {\n \t\n    \tif(decoded_data.register == true)    \/\/ if success to register: { register: true, client_id: 'id', token: 'login token' };\n\t    {\n\n\t    \tconst personnr  = jquery('#personnr').val();\n\t    \tconst firstname = jquery('#firstname').val();\n\t    \tconst lastname = jquery('#lastname').val();\n\t    \tconst phone = jquery('#phone').val();\n\t    \tconst email = jquery('#email').val();\n\t    \tconst password1 = jquery('#password1').val();\n\t    \tconst birthdate = jquery('#birthdate').val();\n\t    \tconst address = jquery('#address').val();\n\t    \tconst zipcode = jquery('#zipcode').val();\n\t    \tconst region_code = jquery('#region_code').val();\n\t    \tconst commune_code = jquery('#commune_code').val();\n\n\n\t    \tconst client_id = decoded_data.client_id;\n\t    \tconst token = decoded_data.token;\n\t    \tregister_user_on_local_wordpress(personnr, firstname, lastname, phone, email, password1, birthdate, address, zipcode, region_code, commune_code,  client_id, token);\n\t    }\n\t  \n    }\n\n});\n\n\n\n\n\tfunction register_user_on_local_wordpress(personnr, firstname, lastname, phone, email, password1, birthdate, address, zipcode, region_code, commune_code,  client_id, token)\n\t{\n\t    var ajaxurl = jQuery('#customajaxurl').val();\n\t\tjQuery.ajax({\n\t\ttype: 'POST',\n\t\turl: ajaxurl,\n\t\t\/\/async: false,\n\t\tbeforeSend: function ()\n\t\t{\n\n\t\t},\n\t\tdata:{action:'register_user_on_local_wordpress',searched_string:value,maxresults:10},\n\t\tsuccess: function(res)\n\t\t{\n\t\t\tjQuery('.loading_icon_pr').hide();\n\t\t\tjQuery('.custom_icon').show();\n\t\t\tdata = JSON.parse(res);\n\t\t\t\/\/console.log(data);\n\n\t\t}\n\t\t});\n\t}\n\n<\/script><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-4793","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/madinah.se\/sv\/wp-json\/wp\/v2\/pages\/4793","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/madinah.se\/sv\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/madinah.se\/sv\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/madinah.se\/sv\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/madinah.se\/sv\/wp-json\/wp\/v2\/comments?post=4793"}],"version-history":[{"count":4,"href":"https:\/\/madinah.se\/sv\/wp-json\/wp\/v2\/pages\/4793\/revisions"}],"predecessor-version":[{"id":4798,"href":"https:\/\/madinah.se\/sv\/wp-json\/wp\/v2\/pages\/4793\/revisions\/4798"}],"wp:attachment":[{"href":"https:\/\/madinah.se\/sv\/wp-json\/wp\/v2\/media?parent=4793"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}