text1,text2 ,afm WORKS, text3 no

parent 07314fc9
......@@ -13,11 +13,11 @@ array(
'type' => 'webform',
'language' => 'el',
'created' => '1524557819',
'changed' => '1524559460',
'changed' => '1524567231',
'tnid' => '0',
'translate' => '0',
'uuid' => '4f0623e8-50c7-4755-912f-a233324aab84',
'revision_timestamp' => '1524559460',
'revision_timestamp' => '1524567231',
'revision_uid' => '1',
'field_webform_results_access' => array(),
'field_editors' => array(),
......@@ -213,6 +213,39 @@ array(
'weight' => '2',
'page_num' => 1,
),
6 => array(
'nid' => 1,
'cid' => '6',
'pid' => '0',
'form_key' => 'afm',
'name' => 'ΑΦΜ',
'type' => 'textfield',
'value' => '',
'extra' => array(
'title_display' => 'before',
'description_above' => 0,
'private' => 0,
'wrapper_classes' => '',
'css_classes' => '',
'wfm_max_items' => '1',
'wfm_min_items' => '1',
'wfm_add_more_text' => 'Προσθήκη ενός ακόμα αντικειμένου',
'width' => '',
'maxlength' => '',
'minlength' => '',
'field_prefix' => '',
'field_suffix' => '',
'disabled' => 0,
'unique' => 0,
'description' => '',
'placeholder' => '',
'attributes' => array(),
'analysis' => FALSE,
),
'required' => '0',
'weight' => '3',
'page_num' => 1,
),
3 => array(
'nid' => 1,
'cid' => '3',
......@@ -227,7 +260,24 @@ array(
'display_on' => 'form',
),
'required' => '0',
'weight' => '3',
'weight' => '4',
'page_num' => 1,
),
7 => array(
'nid' => 1,
'cid' => '7',
'pid' => '0',
'form_key' => 'markup_afm',
'name' => 'markup_afm',
'type' => 'markup',
'value' => "<script>\r\n// Στον παρακάτω κώδικα αντικαταστείστε το \"edit-submitted-afm\" με τον id του πεδίου που σας ενδιαφέρει.\r\n\r\nfunction checkAFM(afm) {\r\n if (!afm.match(/^\\d{9}$/) || afm == '000000000')\r\n return false;\r\n var m = 1, sum = 0;\r\n for (var i = 7; i >= 0; i--) {\r\n m *= 2;\r\n sum += afm.charAt(i) * m;\r\n }\r\n return sum % 11 % 10 == afm.charAt(8);\r\n}\r\n\r\nfunction afm_init_check() {\r\n//Εδώ καλούμε μια function checkAFM που επιστρέφει true/false και εμφανίζουμε το κατάλληλο μήνυμα. \r\nvar afm=document.getElementById(\"edit-submitted-afm\").value;\r\nif(!checkAFM(afm)) alert (\"ΛΑΘΟΣ ΑΦΜ\");\r\n}\r\n\r\nvar el = document.getElementById(\"edit-submitted-afm\");\r\n//Εδώ προσθέτουμε τον Listerner στο πεδίο μας. 'Οταν χάσει το focus το πεδίο αυτό τότε θα εκτελείται η function afm_init_check\r\nel.addEventListener(\"blur\", afm_init_check);\r\n</script>\r\n",
'extra' => array(
'format' => 'full_html',
'private' => 0,
'display_on' => 'form',
),
'required' => '0',
'weight' => '4',
'page_num' => 1,
),
5 => array(
......@@ -244,7 +294,7 @@ array(
'display_on' => 'form',
),
'required' => '0',
'weight' => '3',
'weight' => '5',
'page_num' => 1,
),
),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment