Version Description
Limited up to 9 fields to add New: Enable/Disable Title and Middle Name for Name field
Download this release
Release Info
Developer | webdorado |
Plugin | Form Maker by WD – user-friendly drag & drop Form Builder plugin |
Version | 1.7.46 |
Comparing to | |
See all releases |
Code changes from version 1.7.45 to 1.7.46
- admin/models/FMModelManage_fm.php +21 -12
- admin/views/FMViewSubmissions_fm.php +57 -48
- form-maker.php +2 -2
- frontend/views/FMViewForm_maker.php +182 -186
- js/formmaker_div_free.js +582 -350
- js/formmaker_free.js +4 -4
- readme.txt +6 -2
admin/models/FMModelManage_fm.php
CHANGED
@@ -327,8 +327,8 @@ class FMModelManage_fm {
|
|
327 |
$rep ='<div id="wdform_field'.$id.'" type="type_phone" class="wdform_field" style="display: table-cell;">'.$arrows.'<div align="left" id="'.$id.'_label_sectionform_id_temp" class="'.$param['w_class'].'" style="display: '.$param['w_field_label_pos'].'; width: '.$param['w_field_label_size'].'px;"><span id="'.$id.'_element_labelform_id_temp" class="label" style="vertical-align: top;">'.$label.'</span><span id="'.$id.'_required_elementform_id_temp" class="required">'.$required_sym.'</span></div><div align="left" id="'.$id.'_element_sectionform_id_temp" class="'.$param['w_class'].'" style="display: '.$param['w_field_label_pos'].';"><input type="hidden" value="type_phone" name="'.$id.'_typeform_id_temp" id="'.$id.'_typeform_id_temp"><input type="hidden" value="'.$param['w_required'].'" name="'.$id.'_requiredform_id_temp" id="'.$id.'_requiredform_id_temp"><input type="hidden" value="'.$param['w_unique'].'" name="'.$id.'_uniqueform_id_temp" id="'.$id.'_uniqueform_id_temp"><div id="'.$id.'_table_name" style="display: table;"><div id="'.$id.'_tr_name1" style="display: table-row;"><div id="'.$id.'_td_name_input_first" style="display: table-cell;"><input type="text" class="'.$input_active.'" id="'.$id.'_element_firstform_id_temp" name="'.$id.'_element_firstform_id_temp" value="'.$w_first_val[0].'" title="'.$w_title[0].'" onfocus="delete_value("'.$id.'_element_firstform_id_temp")"onblur="return_value("'.$id.'_element_firstform_id_temp")"onchange="change_value("'.$id.'_element_firstform_id_temp")" onkeypress="return check_isnum(event)"style="width: 50px;" '.$param['attributes'].' disabled /><span class="wdform_line" style="margin: 0px 4px; padding: 0px;">-</span></div><div id="'.$id.'_td_name_input_last" style="display: table-cell;"><input type="text" class="'.$input_active.'" id="'.$id.'_element_lastform_id_temp" name="'.$id.'_element_lastform_id_temp" value="'.$w_first_val[1].'" title="'.$w_title[1].'" onfocus="delete_value("'.$id.'_element_lastform_id_temp")"onblur="return_value("'.$id.'_element_lastform_id_temp")" onchange="change_value("'.$id.'_element_lastform_id_temp")" onkeypress="return check_isnum(event)"style="width: '.$param['w_size'].'px;" '.$param['attributes'].' disabled /></div></div><div id="'.$id.'_tr_name2" style="display: table-row;"><div id="'.$id.'_td_name_label_first" align="left" style="display: table-cell;"><label class="mini_label" id="'.$id.'_mini_label_area_code">'.$w_mini_labels[0].'</label></div><div id="'.$id.'_td_name_label_last" align="left" style="display: table-cell;"><label class="mini_label" id="'.$id.'_mini_label_phone_number">'.$w_mini_labels[1].'</label></div></div></div></div></div>';
|
328 |
break;
|
329 |
}
|
330 |
-
|
331 |
-
$params_names = array('w_field_label_size', 'w_field_label_pos', 'w_first_val', 'w_title', 'w_mini_labels', 'w_size', 'w_name_format', 'w_required', 'w_unique', 'w_class');
|
332 |
$temp = $params;
|
333 |
foreach ($params_names as $params_name) {
|
334 |
$temp = explode('*:*' . $params_name . '*:*', $temp);
|
@@ -347,18 +347,27 @@ class FMModelManage_fm {
|
|
347 |
$w_first_val = explode('***', $param['w_first_val']);
|
348 |
$w_title = explode('***', $param['w_title']);
|
349 |
$w_mini_labels = explode('***', $param['w_mini_labels']);
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
359 |
break;
|
360 |
}
|
361 |
-
|
362 |
$params_names = array('w_field_label_size', 'w_field_label_pos', 'w_size', 'w_mini_labels', 'w_disabled_fields', 'w_required', 'w_class');
|
363 |
$temp = $params;
|
364 |
foreach ($params_names as $params_name) {
|
327 |
$rep ='<div id="wdform_field'.$id.'" type="type_phone" class="wdform_field" style="display: table-cell;">'.$arrows.'<div align="left" id="'.$id.'_label_sectionform_id_temp" class="'.$param['w_class'].'" style="display: '.$param['w_field_label_pos'].'; width: '.$param['w_field_label_size'].'px;"><span id="'.$id.'_element_labelform_id_temp" class="label" style="vertical-align: top;">'.$label.'</span><span id="'.$id.'_required_elementform_id_temp" class="required">'.$required_sym.'</span></div><div align="left" id="'.$id.'_element_sectionform_id_temp" class="'.$param['w_class'].'" style="display: '.$param['w_field_label_pos'].';"><input type="hidden" value="type_phone" name="'.$id.'_typeform_id_temp" id="'.$id.'_typeform_id_temp"><input type="hidden" value="'.$param['w_required'].'" name="'.$id.'_requiredform_id_temp" id="'.$id.'_requiredform_id_temp"><input type="hidden" value="'.$param['w_unique'].'" name="'.$id.'_uniqueform_id_temp" id="'.$id.'_uniqueform_id_temp"><div id="'.$id.'_table_name" style="display: table;"><div id="'.$id.'_tr_name1" style="display: table-row;"><div id="'.$id.'_td_name_input_first" style="display: table-cell;"><input type="text" class="'.$input_active.'" id="'.$id.'_element_firstform_id_temp" name="'.$id.'_element_firstform_id_temp" value="'.$w_first_val[0].'" title="'.$w_title[0].'" onfocus="delete_value("'.$id.'_element_firstform_id_temp")"onblur="return_value("'.$id.'_element_firstform_id_temp")"onchange="change_value("'.$id.'_element_firstform_id_temp")" onkeypress="return check_isnum(event)"style="width: 50px;" '.$param['attributes'].' disabled /><span class="wdform_line" style="margin: 0px 4px; padding: 0px;">-</span></div><div id="'.$id.'_td_name_input_last" style="display: table-cell;"><input type="text" class="'.$input_active.'" id="'.$id.'_element_lastform_id_temp" name="'.$id.'_element_lastform_id_temp" value="'.$w_first_val[1].'" title="'.$w_title[1].'" onfocus="delete_value("'.$id.'_element_lastform_id_temp")"onblur="return_value("'.$id.'_element_lastform_id_temp")" onchange="change_value("'.$id.'_element_lastform_id_temp")" onkeypress="return check_isnum(event)"style="width: '.$param['w_size'].'px;" '.$param['attributes'].' disabled /></div></div><div id="'.$id.'_tr_name2" style="display: table-row;"><div id="'.$id.'_td_name_label_first" align="left" style="display: table-cell;"><label class="mini_label" id="'.$id.'_mini_label_area_code">'.$w_mini_labels[0].'</label></div><div id="'.$id.'_td_name_label_last" align="left" style="display: table-cell;"><label class="mini_label" id="'.$id.'_mini_label_phone_number">'.$w_mini_labels[1].'</label></div></div></div></div></div>';
|
328 |
break;
|
329 |
}
|
330 |
+
case 'type_name': {
|
331 |
+
$params_names = array('w_field_label_size', 'w_field_label_pos', 'w_first_val', 'w_title', 'w_mini_labels', 'w_size', 'w_name_format', 'w_required', 'w_unique', 'w_class', 'w_name_fields');
|
332 |
$temp = $params;
|
333 |
foreach ($params_names as $params_name) {
|
334 |
$temp = explode('*:*' . $params_name . '*:*', $temp);
|
347 |
$w_first_val = explode('***', $param['w_first_val']);
|
348 |
$w_title = explode('***', $param['w_title']);
|
349 |
$w_mini_labels = explode('***', $param['w_mini_labels']);
|
350 |
+
|
351 |
+
$param['w_name_fields'] = $param['w_name_fields']!='' ? $param['w_name_fields'] : ($param['w_name_format'] == 'normal' ? 'no***no' : 'yes***yes');
|
352 |
+
$w_name_fields = explode('***', $param['w_name_fields']);
|
353 |
+
|
354 |
+
$w_name_format = '<div id="'.$id.'_td_name_input_first" style="display: table-cell;"><input type="text" class="'.($w_first_val[0]==$w_title[0] ? "input_deactive" : "input_active").'" id="'.$id.'_element_firstform_id_temp" name="'.$id.'_element_firstform_id_temp" value="'.$w_first_val[0].'" title="'.$w_title[0].'" onfocus="delete_value("'.$id.'_element_firstform_id_temp")"onblur="return_value("'.$id.'_element_firstform_id_temp")" onchange="change_value("'.$id.'_element_firstform_id_temp")" style="margin-right: 10px; width: '.$param['w_size'].'px;"'.$param['attributes'].' disabled /></div><div id="'.$id.'_td_name_input_last" style="display: table-cell;"><input type="text" class="'.($w_first_val[1]==$w_title[1] ? "input_deactive" : "input_active").'" id="'.$id.'_element_lastform_id_temp" name="'.$id.'_element_lastform_id_temp" value="'.$w_first_val[1].'" title="'.$w_title[1].'" onfocus="delete_value("'.$id.'_element_lastform_id_temp")"onblur="return_value("'.$id.'_element_lastform_id_temp")" onchange="change_value("'.$id.'_element_lastform_id_temp")" style="margin-right: 10px; width: '.$param['w_size'].'px;" '.$param['attributes'].' disabled /></div>';
|
355 |
+
$w_name_format_mini_labels = '<div id="'.$id.'_td_name_label_first" align="left" style="display: table-cell;"><label class="mini_label" id="'.$id.'_mini_label_first">'.$w_mini_labels[1].'</label></div><div id="'.$id.'_td_name_label_last" align="left" style="display: table-cell;"><label class="mini_label" id="'.$id.'_mini_label_last">'.$w_mini_labels[2].'</label></div>';
|
356 |
+
|
357 |
+
if($w_name_fields[0] == 'yes') {
|
358 |
+
$w_name_format = '<div id="'.$id.'_td_name_input_title" style="display: table-cell;"><input type="text" class="'.($w_first_val[2]==$w_title[2] ? "input_deactive" : "input_active").'" id="'.$id.'_element_titleform_id_temp" name="'.$id.'_element_titleform_id_temp" value="'.$w_first_val[2].'" title="'.$w_title[2].'" onfocus="delete_value("'.$id.'_element_titleform_id_temp")" onblur="return_value("'.$id.'_element_titleform_id_temp")" onchange="change_value("'.$id.'_element_titleform_id_temp")" style="margin: 0px 10px 0px 0px; width: 40px;" disabled /></div>'.$w_name_format;
|
359 |
+
$w_name_format_mini_labels ='<div id="'.$id.'_td_name_label_title" align="left" style="display: table-cell;"><label class="mini_label" id="'.$id.'_mini_label_title">'.$w_mini_labels[0].'</label></div>'.$w_name_format_mini_labels;
|
360 |
+
}
|
361 |
+
|
362 |
+
if($w_name_fields[1] == 'yes') {
|
363 |
+
$w_name_format = $w_name_format.'<div id="'.$id.'_td_name_input_middle" style="display: table-cell;"><input type="text" class="'.($w_first_val[3]==$w_title[3] ? "input_deactive" : "input_active").'" id="'.$id.'_element_middleform_id_temp" name="'.$id.'_element_middleform_id_temp" value="'.$w_first_val[3].'" title="'.$w_title[3].'" onfocus="delete_value("'.$id.'_element_middleform_id_temp")" onblur="return_value("'.$id.'_element_middleform_id_temp")" onchange="change_value("'.$id.'_element_middleform_id_temp")" style="width: '.$param['w_size'].'px;" disabled /></div>';
|
364 |
+
$w_name_format_mini_labels = $w_name_format_mini_labels.'<div id="'.$id.'_td_name_label_middle" align="left" style="display: table-cell;"><label class="mini_label" id="'.$id.'_mini_label_middle">'.$w_mini_labels[3].'</label></div>';
|
365 |
+
}
|
366 |
+
|
367 |
+
$rep ='<div id="wdform_field'.$id.'" type="type_name" class="wdform_field" style="display: table-cell;">'.$arrows.'<div align="left" id="'.$id.'_label_sectionform_id_temp" class="'.$param['w_class'].'" style="display: '.$param['w_field_label_pos'].'; width: '.$param['w_field_label_size'].'px;"><span id="'.$id.'_element_labelform_id_temp" class="label" style="vertical-align: top;">'.$label.'</span><span id="'.$id.'_required_elementform_id_temp" class="required" style="vertical-align: top;">'.$required_sym.'</span></div><div align="left" id="'.$id.'_element_sectionform_id_temp" class="'.$param['w_class'].'" style="display: '.$param['w_field_label_pos'].';"><input type="hidden" value="type_name" name="'.$id.'_typeform_id_temp" id="'.$id.'_typeform_id_temp"><input type="hidden" value="'.$param['w_required'].'" name="'.$id.'_requiredform_id_temp" id="'.$id.'_requiredform_id_temp"><input type="hidden" value="'.$param['w_unique'].'" name="'.$id.'_uniqueform_id_temp" id="'.$id.'_uniqueform_id_temp"><input type="hidden" name="'.$id.'_enable_fieldsform_id_temp" id="'.$id.'_enable_fieldsform_id_temp" title="'.$w_name_fields[0].'" first="yes" last="yes" middle="'.$w_name_fields[1].'"><div id="'.$id.'_table_name" cellpadding="0" cellspacing="0" style="display: table;"><div id="'.$id.'_tr_name1" style="display: table-row;">'.$w_name_format.'</div><div id="'.$id.'_tr_name2" style="display: table-row;">'.$w_name_format_mini_labels.'</div></div></div></div>';
|
368 |
break;
|
369 |
}
|
370 |
+
case 'type_address': {
|
371 |
$params_names = array('w_field_label_size', 'w_field_label_pos', 'w_size', 'w_mini_labels', 'w_disabled_fields', 'w_required', 'w_class');
|
372 |
$temp = $params;
|
373 |
foreach ($params_names as $params_name) {
|
admin/views/FMViewSubmissions_fm.php
CHANGED
@@ -1411,13 +1411,12 @@ class FMViewSubmissions_fm {
|
|
1411 |
|
1412 |
break;
|
1413 |
}
|
1414 |
-
|
1415 |
-
case 'type_name': {
|
1416 |
|
1417 |
if($element_value =='')
|
1418 |
$element_value = '@@@';
|
1419 |
|
1420 |
-
$params_names=array('w_field_label_size','w_field_label_pos','w_first_val','w_title', 'w_mini_labels','w_size','w_name_format','w_required','w_unique', 'w_class');
|
1421 |
$temp=$params;
|
1422 |
|
1423 |
foreach($params_names as $params_name ) {
|
@@ -1428,56 +1427,66 @@ class FMViewSubmissions_fm {
|
|
1428 |
|
1429 |
|
1430 |
if($temp) {
|
1431 |
-
$temp =explode('*:*w_attr_name*:*',$temp);
|
1432 |
-
$attrs
|
1433 |
foreach($attrs as $attr)
|
1434 |
$param['attributes'] = $param['attributes'].' '.$attr;
|
1435 |
}
|
1436 |
|
1437 |
$w_mini_labels = explode('***',$param['w_mini_labels']);
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
-
|
1450 |
-
|
1451 |
-
|
1452 |
-
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
|
1479 |
-
|
1480 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1481 |
$wdformfieldsize = ($param['w_field_label_pos']=="left" ? ($param['w_field_label_size']+$w_size) : max($param['w_field_label_size'],$w_size));
|
1482 |
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
1483 |
|
1411 |
|
1412 |
break;
|
1413 |
}
|
1414 |
+
case 'type_name': {
|
|
|
1415 |
|
1416 |
if($element_value =='')
|
1417 |
$element_value = '@@@';
|
1418 |
|
1419 |
+
$params_names=array('w_field_label_size','w_field_label_pos','w_first_val','w_title', 'w_mini_labels','w_size','w_name_format','w_required','w_unique', 'w_class', 'w_name_fields');
|
1420 |
$temp=$params;
|
1421 |
|
1422 |
foreach($params_names as $params_name ) {
|
1427 |
|
1428 |
|
1429 |
if($temp) {
|
1430 |
+
$temp = explode('*:*w_attr_name*:*',$temp);
|
1431 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
1432 |
foreach($attrs as $attr)
|
1433 |
$param['attributes'] = $param['attributes'].' '.$attr;
|
1434 |
}
|
1435 |
|
1436 |
$w_mini_labels = explode('***',$param['w_mini_labels']);
|
1437 |
+
$param['w_name_fields'] = $param['w_name_fields']!='' ? $param['w_name_fields'] : ($param['w_name_format'] == 'normal' ? 'no***no' : 'yes***yes');
|
1438 |
+
$w_name_fields = explode('***', $param['w_name_fields']);
|
1439 |
+
$element_value = explode('@@@', $element_value);
|
1440 |
+
|
1441 |
+
if($w_name_fields[0]== 'no' && $w_name_fields[1]== 'no' ) {
|
1442 |
+
$w_name_format = '
|
1443 |
+
<div style="display: table-cell; width:50%">
|
1444 |
+
<div><input type="text" class="" id="wdform_'.$id1.'_element_first'.$form_id.'" name="wdform_'.$id1.'_element_first'.$form_id.'" value="'.(count($element_value)==2 ? $element_value[0] : $element_value[1]).'" style="width: 100%;"'.$param['attributes'].'></div>
|
1445 |
+
<div><label class="mini_label">'.$w_mini_labels[1].'</label></div>
|
1446 |
+
</div>
|
1447 |
+
<div style="display:table-cell;"><div style="margin: 0px 8px; padding: 0px;"></div></div>
|
1448 |
+
<div style="display: table-cell; width:50%">
|
1449 |
+
<div><input type="text" class="" id="wdform_'.$id1.'_element_last'.$form_id.'" name="wdform_'.$id1.'_element_last'.$form_id.'" value="'.(count($element_value)==2 ? $element_value[1] : $element_value[2]).'" style="width: 100%;" '.$param['attributes'].'></div>
|
1450 |
+
<div><label class="mini_label">'.$w_mini_labels[2].'</label></div>
|
1451 |
+
</div>
|
1452 |
+
';
|
1453 |
+
$w_size=2*$param['w_size'];
|
1454 |
+
}
|
1455 |
+
else {
|
1456 |
+
$first_last_size = $w_name_fields[0] == 'yes' && $w_name_fields[1] == 'no' ? 45 : 30;
|
1457 |
+
$w_name_format = '
|
1458 |
+
<div style="display: table-cell; width:30%">
|
1459 |
+
<div><input type="text" class="" id="wdform_'.$id1.'_element_first'.$form_id.'" name="wdform_'.$id1.'_element_first'.$form_id.'" value="'.(count($element_value)==2 ? $element_value[0] : $element_value[1]).'" style="width:100%;"></div>
|
1460 |
+
<div><label class="mini_label">'.$w_mini_labels[1].'</label></div>
|
1461 |
+
</div>
|
1462 |
+
<div style="display:table-cell;"><div style="margin: 0px 4px; padding: 0px;"></div></div>
|
1463 |
+
<div style="display: table-cell; width:30%">
|
1464 |
+
<div><input type="text" class="" id="wdform_'.$id1.'_element_last'.$form_id.'" name="wdform_'.$id1.'_element_last'.$form_id.'" value="'.(count($element_value)==2 ? $element_value[1] : $element_value[2]).'" style="width: 100%;"></div>
|
1465 |
+
<div><label class="mini_label">'.$w_mini_labels[2].'</label></div>
|
1466 |
+
</div>';
|
1467 |
+
$w_size = 2*$param['w_size'];
|
1468 |
+
|
1469 |
+
if($w_name_fields[0] == 'yes') {
|
1470 |
+
$w_name_format = '
|
1471 |
+
<div style="display: table-cell;">
|
1472 |
+
<div><input type="text" class="" id="wdform_'.$id1.'_element_title'.$form_id.'" name="wdform_'.$id1.'_element_title'.$form_id.'" value="'.(count($element_value)==2 ? "" : $element_value[0]).'" style="width: 40px;"></div>
|
1473 |
+
<div><label class="mini_label">'.$w_mini_labels[0].'</label></div>
|
1474 |
+
</div>
|
1475 |
+
<div style="display:table-cell;"><div style="margin: 0px 1px; padding: 0px;"></div></div>'.$w_name_format;
|
1476 |
+
$w_size += 80;
|
1477 |
+
}
|
1478 |
+
if($w_name_fields[1] == 'yes') {
|
1479 |
+
$w_name_format = $w_name_format.'
|
1480 |
+
<div style="display:table-cell;"><div style="margin: 0px 4px; padding: 0px;"></div></div>
|
1481 |
+
<div style="display: table-cell; width:30%">
|
1482 |
+
<div><input type="text" class="" id="wdform_'.$id1.'_element_middle'.$form_id.'" name="wdform_'.$id1.'_element_middle'.$form_id.'" value="'.(count($element_value)==2 ? "" : $element_value[3]).'"style="width: 100%;"></div>
|
1483 |
+
<div><label class="mini_label">'.$w_mini_labels[3].'</label></div>
|
1484 |
+
</div>
|
1485 |
+
';
|
1486 |
+
$w_size += $param['w_size'];
|
1487 |
+
}
|
1488 |
+
}
|
1489 |
+
|
1490 |
$wdformfieldsize = ($param['w_field_label_pos']=="left" ? ($param['w_field_label_size']+$w_size) : max($param['w_field_label_size'],$w_size));
|
1491 |
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
1492 |
|
form-maker.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Form Maker
|
4 |
* Plugin URI: http://web-dorado.com/products/form-maker-wordpress.html
|
5 |
* Description: This plugin is a modern and advanced tool for easy and fast creating of a WordPress Form. The backend interface is intuitive and user friendly which allows users far from scripting and programming to create WordPress Forms.
|
6 |
-
* Version: 1.7.
|
7 |
* Author: WebDorado
|
8 |
* Author URI: http://web-dorado.com/
|
9 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
@@ -216,7 +216,7 @@ if (class_exists('WP_Widget')) {
|
|
216 |
// Activate plugin.
|
217 |
function form_maker_activate() {
|
218 |
$version = get_option("wd_form_maker_version");
|
219 |
-
$new_version = '1.7.
|
220 |
if (!$version) {
|
221 |
add_option("wd_form_maker_version", $new_version, '', 'no');
|
222 |
global $wpdb;
|
3 |
* Plugin Name: Form Maker
|
4 |
* Plugin URI: http://web-dorado.com/products/form-maker-wordpress.html
|
5 |
* Description: This plugin is a modern and advanced tool for easy and fast creating of a WordPress Form. The backend interface is intuitive and user friendly which allows users far from scripting and programming to create WordPress Forms.
|
6 |
+
* Version: 1.7.46
|
7 |
* Author: WebDorado
|
8 |
* Author URI: http://web-dorado.com/
|
9 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
216 |
// Activate plugin.
|
217 |
function form_maker_activate() {
|
218 |
$version = get_option("wd_form_maker_version");
|
219 |
+
$new_version = '1.7.46';
|
220 |
if (!$version) {
|
221 |
add_option("wd_form_maker_version", $new_version, '', 'no');
|
222 |
global $wpdb;
|
frontend/views/FMViewForm_maker.php
CHANGED
@@ -246,26 +246,27 @@ class FMViewForm_maker {
|
|
246 |
$click .= '#wdform_'.$params_value[0].'_element'.$form_id.' ~ a, ';
|
247 |
break;
|
248 |
|
|
|
249 |
case "type_name":
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
{
|
265 |
$extended0 = 'jQuery("#wdform_'.$params_value[0].'_element_title'.$form_id.'").val().indexOf("'.$name_fields[0].'")'.$like_or_not.'-1 ';
|
266 |
$normal0 = 'jQuery("#wdform_'.$params_value[0].'_element_first'.$form_id.'").val().indexOf("'.$name_fields[0].'")'.$like_or_not.'-1 ';
|
267 |
}
|
268 |
-
|
269 |
if(isset($name_fields[1]) && $name_fields[1]!='')
|
270 |
{
|
271 |
$extended1 = 'jQuery("#wdform_'.$params_value[0].'_element_first'.$form_id.'").val().indexOf("'.$name_fields[1].'")'.$like_or_not.'-1 ';
|
@@ -277,165 +278,165 @@ class FMViewForm_maker {
|
|
277 |
$extended2 = 'jQuery("#wdform_'.$params_value[0].'_element_last'.$form_id.'").val().indexOf("'.$name_fields[2].'")'.$like_or_not.'-1 ';
|
278 |
$normal2 = '';
|
279 |
}
|
280 |
-
|
281 |
if(isset($name_fields[3]) && $name_fields[3]!='')
|
282 |
{
|
283 |
$extended3 = 'jQuery("#wdform_'.$params_value[0].'_element_middle'.$form_id.'").val().indexOf("'.$name_fields[3].'")'.$like_or_not.'-1 ';
|
284 |
$normal3 = '';
|
285 |
}
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
{
|
290 |
-
$extended ='';
|
291 |
-
$normal ='';
|
292 |
-
if($extended0)
|
293 |
-
{
|
294 |
-
$extended = $extended0;
|
295 |
-
if($extended1)
|
296 |
-
{
|
297 |
-
$extended .= ' && '.$extended1;
|
298 |
-
if($extended2)
|
299 |
-
$extended .=' && '.$extended2;
|
300 |
-
|
301 |
-
if($extended3)
|
302 |
-
$extended .=' && '.$extended3;
|
303 |
-
}
|
304 |
-
else
|
305 |
-
{
|
306 |
-
if($extended2)
|
307 |
-
$extended .= ' && '.$extended2;
|
308 |
-
if($extended3)
|
309 |
-
$extended .= ' && '.$extended3;
|
310 |
-
}
|
311 |
-
}
|
312 |
-
else
|
313 |
{
|
314 |
-
|
|
|
|
|
315 |
{
|
316 |
-
$extended = $
|
317 |
-
if($
|
318 |
-
$extended .=' && '.$extended2;
|
319 |
-
|
320 |
-
if($extended3)
|
321 |
-
$extended .=' && '.$extended3;
|
322 |
-
}
|
323 |
-
else
|
324 |
-
{
|
325 |
-
if($extended2)
|
326 |
{
|
327 |
-
$extended
|
|
|
|
|
|
|
328 |
if($extended3)
|
329 |
-
$extended .=
|
330 |
}
|
331 |
else
|
|
|
|
|
|
|
332 |
if($extended3)
|
333 |
-
$extended
|
334 |
-
|
335 |
-
}
|
336 |
-
|
337 |
-
if($normal0)
|
338 |
-
{
|
339 |
-
$normal = $normal0;
|
340 |
-
if($normal1)
|
341 |
-
$normal .= ' && '.$normal1;
|
342 |
-
}
|
343 |
-
else
|
344 |
-
{
|
345 |
-
if($normal1)
|
346 |
-
$normal = $normal1;
|
347 |
-
}
|
348 |
-
}
|
349 |
-
else
|
350 |
-
{
|
351 |
-
if(isset($name_fields[2]))
|
352 |
-
{
|
353 |
-
$extended ="";
|
354 |
-
$normal ="";
|
355 |
-
if($extended0)
|
356 |
-
{
|
357 |
-
$extended = $extended0;
|
358 |
-
if($extended1)
|
359 |
-
$extended .= ' && '.$extended1;
|
360 |
-
|
361 |
-
if($extended2)
|
362 |
-
$extended .=' && '.$extended2;
|
363 |
-
|
364 |
}
|
365 |
else
|
366 |
{
|
367 |
if($extended1)
|
368 |
-
{
|
369 |
$extended = $extended1;
|
370 |
if($extended2)
|
371 |
-
$extended .=
|
372 |
-
|
|
|
|
|
|
|
373 |
else
|
|
|
374 |
if($extended2)
|
375 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
376 |
}
|
377 |
-
|
378 |
-
|
379 |
if($normal0)
|
380 |
{
|
381 |
-
$normal = $normal0;
|
382 |
if($normal1)
|
383 |
$normal .= ' && '.$normal1;
|
384 |
}
|
385 |
else
|
386 |
{
|
387 |
if($normal1)
|
388 |
-
$normal = $normal1;
|
389 |
}
|
390 |
-
|
391 |
}
|
392 |
else
|
393 |
{
|
394 |
-
if(isset($name_fields[
|
395 |
{
|
396 |
-
$extended =
|
397 |
-
$normal =
|
398 |
if($extended0)
|
399 |
{
|
|
|
400 |
if($extended1)
|
401 |
-
$extended
|
402 |
-
|
403 |
-
|
|
|
|
|
404 |
}
|
405 |
else
|
406 |
{
|
407 |
if($extended1)
|
|
|
408 |
$extended = $extended1;
|
|
|
|
|
|
|
|
|
|
|
|
|
409 |
}
|
410 |
|
411 |
|
412 |
if($normal0)
|
413 |
{
|
|
|
414 |
if($normal1)
|
415 |
-
$normal
|
416 |
-
else
|
417 |
-
$normal = $normal0;
|
418 |
}
|
419 |
else
|
420 |
{
|
421 |
if($normal1)
|
422 |
$normal = $normal1;
|
423 |
}
|
|
|
424 |
}
|
425 |
else
|
426 |
{
|
427 |
-
$
|
428 |
-
|
429 |
-
|
430 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
431 |
}
|
432 |
-
|
433 |
-
if($extended!="" && $normal!="")
|
434 |
-
$if .= ' ((jQuery("#wdform_'.$params_value[0].'_element_title'.$form_id.'").length != 0) ? '.$extended.' : '.$normal.') ';
|
435 |
else
|
436 |
-
$if .= ' true';
|
437 |
-
}
|
438 |
-
else
|
439 |
{
|
440 |
if($params_value[1] == "=" || $params_value[1] == "!")
|
441 |
{
|
@@ -444,7 +445,7 @@ class FMViewForm_maker {
|
|
444 |
$extended = ' (jQuery("#wdform_'.$params_value[0].'_element_title'.$form_id.'").val()'.$name_empty_or_not.'"" '.$name_and_or.' jQuery("#wdform_'.$params_value[0].'_element_first'.$form_id.'").val()'.$name_empty_or_not.'"" '.$name_and_or.' jQuery("#wdform_'.$params_value[0].'_element_last'.$form_id.'").val()'.$name_empty_or_not.'"" '.$name_and_or.' jQuery("#wdform_'.$params_value[0].'_element_middle'.$form_id.'").val()'.$name_empty_or_not.'"") ';
|
445 |
$normal = ' (jQuery("#wdform_'.$params_value[0].'_element_first'.$form_id.'").val()'.$name_empty_or_not.'"" '.$name_and_or.' jQuery("#wdform_'.$params_value[0].'_element_last'.$form_id.'").val()'.$name_empty_or_not.'"") ';
|
446 |
|
447 |
-
$if .= ' ((jQuery("#wdform_'.$params_value[0].'_element_title'.$form_id.'").length != 0) ? '.$extended.' : '.$normal.') ';
|
448 |
}
|
449 |
else
|
450 |
{
|
@@ -630,14 +631,13 @@ class FMViewForm_maker {
|
|
630 |
}
|
631 |
|
632 |
if($extended!="" && $normal!="")
|
633 |
-
$if .= ' ((jQuery("#wdform_'.$params_value[0].'_element_title'.$form_id.'").length != 0) ? '.$extended.' : '.$normal.') ';
|
634 |
else
|
635 |
$if .= ' true';
|
636 |
}
|
637 |
}
|
638 |
$keyup .= '#wdform_'.$params_value[0].'_element_title'.$form_id.', #wdform_'.$params_value[0].'_element_first'.$form_id.', #wdform_'.$params_value[0].'_element_last'.$form_id.', #wdform_'.$params_value[0].'_element_middle'.$form_id.', ';
|
639 |
break;
|
640 |
-
|
641 |
case "type_phone":
|
642 |
if($params_value[1] == "==" || $params_value[1] == "!=")
|
643 |
{
|
@@ -1389,8 +1389,8 @@ class FMViewForm_maker {
|
|
1389 |
break;
|
1390 |
}
|
1391 |
|
1392 |
-
|
1393 |
-
$params_names=array('w_field_label_size','w_field_label_pos','w_first_val','w_title', 'w_mini_labels','w_size','w_name_format','w_required','w_unique', 'w_class');
|
1394 |
$temp=$params;
|
1395 |
foreach($params_names as $params_name ) {
|
1396 |
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
@@ -1407,60 +1407,73 @@ class FMViewForm_maker {
|
|
1407 |
|
1408 |
$w_first_val = explode('***',$param['w_first_val']);
|
1409 |
$w_title = explode('***',$param['w_title']);
|
|
|
1410 |
$w_mini_labels = explode('***',$param['w_mini_labels']);
|
1411 |
-
|
|
|
|
|
1412 |
$element_title = isset($_POST['wdform_'.$id1.'_element_title'.$form_id]) ? esc_html(stripslashes($_POST['wdform_'.$id1.'_element_title'.$form_id])) : NULL;
|
|
|
1413 |
$element_first = isset($_POST['wdform_'.$id1.'_element_first'.$form_id]) ? esc_html(stripslashes($_POST['wdform_'.$id1.'_element_first'.$form_id])) : NULL;
|
1414 |
-
if(isset($element_title)) {
|
1415 |
-
$param['w_first_val']=(isset($_POST['wdform_'.$id1.'
|
1416 |
}
|
1417 |
else {
|
1418 |
if(isset($element_first)) {
|
1419 |
$param['w_first_val']=(isset($_POST['wdform_'.$id1.'_element_first'.$form_id]) ? esc_html(stripslashes($_POST['wdform_'.$id1.'_element_first'.$form_id])) : $w_first_val[0]).'***'.(isset($_POST['wdform_'.$id1.'_element_last'.$form_id]) ? esc_html(stripslashes($_POST['wdform_'.$id1.'_element_last'.$form_id])) : $w_first_val[1]);
|
1420 |
}
|
1421 |
}
|
1422 |
-
|
1423 |
$required = ($param['w_required']=="yes" ? true : false);
|
1424 |
-
|
1425 |
$w_first_val = explode('***',$param['w_first_val']);
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
1431 |
-
|
1432 |
-
|
1433 |
-
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
else {
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
-
|
1450 |
-
|
1451 |
-
|
1452 |
-
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1464 |
}
|
1465 |
|
1466 |
$wdformfieldsize = ($param['w_field_label_pos']=="left" ? ($param['w_field_label_size']+$w_size) : max($param['w_field_label_size'],$w_size));
|
@@ -1475,38 +1488,21 @@ class FMViewForm_maker {
|
|
1475 |
<div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos2'].' width: '.$w_size.'px;">'.$w_name_format.'</div></div>';
|
1476 |
|
1477 |
if($required) {
|
1478 |
-
if($param['w_name_format']=='normal') {
|
1479 |
$check_js.='
|
1480 |
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
1481 |
{
|
1482 |
-
if(jQuery("#wdform_'.$id1.'_element_first'.$form_id.'").val()=="'.$w_title[0].'" || jQuery("#wdform_'.$id1.'_element_first'.$form_id.'").val()=="" || jQuery("#wdform_'.$id1.'_element_last'.$form_id.'").val()=="'.$w_title[1].'" || jQuery("#wdform_'.$id1.'_element_last'.$form_id.'").val()=="")
|
1483 |
{
|
1484 |
-
|
1485 |
-
|
1486 |
-
|
1487 |
-
|
1488 |
-
|
1489 |
}
|
1490 |
}
|
1491 |
';
|
1492 |
-
}
|
1493 |
-
else {
|
1494 |
-
$check_js.='
|
1495 |
-
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
1496 |
-
{
|
1497 |
-
if(jQuery("#wdform_'.$id1.'_element_title'.$form_id.'").val()=="'.$w_title[0].'" || jQuery("#wdform_'.$id1.'_element_title'.$form_id.'").val()=="" || jQuery("#wdform_'.$id1.'_element_first'.$form_id.'").val()=="'.$w_title[1].'" || jQuery("#wdform_'.$id1.'_element_first'.$form_id.'").val()=="" || jQuery("#wdform_'.$id1.'_element_last'.$form_id.'").val()=="'.$w_title[2].'" || jQuery("#wdform_'.$id1.'_element_last'.$form_id.'").val()=="" || jQuery("#wdform_'.$id1.'_element_middle'.$form_id.'").val()=="'.$w_title[3].'" || jQuery("#wdform_'.$id1.'_element_middle'.$form_id.'").val()=="")
|
1498 |
-
{
|
1499 |
-
alert("' .addslashes($label. ' ' . __('field is required.', 'form_maker')) . '");
|
1500 |
-
old_bg=x.find(jQuery("div[wdid='.$id1.']")).css("background-color");
|
1501 |
-
x.find(jQuery("div[wdid='.$id1.']")).effect( "shake", {}, 500 ).css("background-color","#FF8F8B").animate({backgroundColor: old_bg}, {duration: 500, queue: false });
|
1502 |
-
jQuery("#wdform_'.$id1.'_element_first'.$form_id.'").focus();
|
1503 |
-
return false;
|
1504 |
-
}
|
1505 |
-
}
|
1506 |
-
';
|
1507 |
-
}
|
1508 |
}
|
1509 |
-
|
1510 |
}
|
1511 |
|
1512 |
case 'type_address': {
|
246 |
$click .= '#wdform_'.$params_value[0].'_element'.$form_id.' ~ a, ';
|
247 |
break;
|
248 |
|
249 |
+
|
250 |
case "type_name":
|
251 |
+
if($params_value[1] == "%" || $params_value[1] == "!%")
|
252 |
+
{
|
253 |
+
$extended0 = '';
|
254 |
+
$extended1 = '';
|
255 |
+
$extended2 = '';
|
256 |
+
$extended3 = '';
|
257 |
+
$normal0 = '';
|
258 |
+
$normal1 = '';
|
259 |
+
$normal2 = '';
|
260 |
+
$normal3 = '';
|
261 |
+
|
262 |
+
$like_or_not = ($params_value[1] == "%" ? ">" : "==");
|
263 |
+
$name_fields = explode(' ',$params_value[2]);
|
264 |
+
if($name_fields[0]!='')
|
265 |
{
|
266 |
$extended0 = 'jQuery("#wdform_'.$params_value[0].'_element_title'.$form_id.'").val().indexOf("'.$name_fields[0].'")'.$like_or_not.'-1 ';
|
267 |
$normal0 = 'jQuery("#wdform_'.$params_value[0].'_element_first'.$form_id.'").val().indexOf("'.$name_fields[0].'")'.$like_or_not.'-1 ';
|
268 |
}
|
269 |
+
|
270 |
if(isset($name_fields[1]) && $name_fields[1]!='')
|
271 |
{
|
272 |
$extended1 = 'jQuery("#wdform_'.$params_value[0].'_element_first'.$form_id.'").val().indexOf("'.$name_fields[1].'")'.$like_or_not.'-1 ';
|
278 |
$extended2 = 'jQuery("#wdform_'.$params_value[0].'_element_last'.$form_id.'").val().indexOf("'.$name_fields[2].'")'.$like_or_not.'-1 ';
|
279 |
$normal2 = '';
|
280 |
}
|
281 |
+
|
282 |
if(isset($name_fields[3]) && $name_fields[3]!='')
|
283 |
{
|
284 |
$extended3 = 'jQuery("#wdform_'.$params_value[0].'_element_middle'.$form_id.'").val().indexOf("'.$name_fields[3].'")'.$like_or_not.'-1 ';
|
285 |
$normal3 = '';
|
286 |
}
|
287 |
+
|
288 |
+
|
289 |
+
if(isset($name_fields[3]))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
290 |
{
|
291 |
+
$extended ='';
|
292 |
+
$normal ='';
|
293 |
+
if($extended0)
|
294 |
{
|
295 |
+
$extended = $extended0;
|
296 |
+
if($extended1)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
297 |
{
|
298 |
+
$extended .= ' && '.$extended1;
|
299 |
+
if($extended2)
|
300 |
+
$extended .=' && '.$extended2;
|
301 |
+
|
302 |
if($extended3)
|
303 |
+
$extended .=' && '.$extended3;
|
304 |
}
|
305 |
else
|
306 |
+
{
|
307 |
+
if($extended2)
|
308 |
+
$extended .= ' && '.$extended2;
|
309 |
if($extended3)
|
310 |
+
$extended .= ' && '.$extended3;
|
311 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
312 |
}
|
313 |
else
|
314 |
{
|
315 |
if($extended1)
|
316 |
+
{
|
317 |
$extended = $extended1;
|
318 |
if($extended2)
|
319 |
+
$extended .=' && '.$extended2;
|
320 |
+
|
321 |
+
if($extended3)
|
322 |
+
$extended .=' && '.$extended3;
|
323 |
+
}
|
324 |
else
|
325 |
+
{
|
326 |
if($extended2)
|
327 |
+
{
|
328 |
+
$extended = $extended2;
|
329 |
+
if($extended3)
|
330 |
+
$extended .= ' && '.$extended3;
|
331 |
+
}
|
332 |
+
else
|
333 |
+
if($extended3)
|
334 |
+
$extended = $extended3;
|
335 |
+
}
|
336 |
}
|
337 |
+
|
|
|
338 |
if($normal0)
|
339 |
{
|
340 |
+
$normal = $normal0;
|
341 |
if($normal1)
|
342 |
$normal .= ' && '.$normal1;
|
343 |
}
|
344 |
else
|
345 |
{
|
346 |
if($normal1)
|
347 |
+
$normal = $normal1;
|
348 |
}
|
|
|
349 |
}
|
350 |
else
|
351 |
{
|
352 |
+
if(isset($name_fields[2]))
|
353 |
{
|
354 |
+
$extended ="";
|
355 |
+
$normal ="";
|
356 |
if($extended0)
|
357 |
{
|
358 |
+
$extended = $extended0;
|
359 |
if($extended1)
|
360 |
+
$extended .= ' && '.$extended1;
|
361 |
+
|
362 |
+
if($extended2)
|
363 |
+
$extended .=' && '.$extended2;
|
364 |
+
|
365 |
}
|
366 |
else
|
367 |
{
|
368 |
if($extended1)
|
369 |
+
{
|
370 |
$extended = $extended1;
|
371 |
+
if($extended2)
|
372 |
+
$extended .= ' && '.$extended2;
|
373 |
+
}
|
374 |
+
else
|
375 |
+
if($extended2)
|
376 |
+
$extended = $extended2;
|
377 |
}
|
378 |
|
379 |
|
380 |
if($normal0)
|
381 |
{
|
382 |
+
$normal = $normal0;
|
383 |
if($normal1)
|
384 |
+
$normal .= ' && '.$normal1;
|
|
|
|
|
385 |
}
|
386 |
else
|
387 |
{
|
388 |
if($normal1)
|
389 |
$normal = $normal1;
|
390 |
}
|
391 |
+
|
392 |
}
|
393 |
else
|
394 |
{
|
395 |
+
if(isset($name_fields[1]))
|
396 |
+
{
|
397 |
+
$extended ='';
|
398 |
+
$normal ='';
|
399 |
+
if($extended0)
|
400 |
+
{
|
401 |
+
if($extended1)
|
402 |
+
$extended = $extended0.' && '.$extended1;
|
403 |
+
else
|
404 |
+
$extended = $extended0;
|
405 |
+
}
|
406 |
+
else
|
407 |
+
{
|
408 |
+
if($extended1)
|
409 |
+
$extended = $extended1;
|
410 |
+
}
|
411 |
+
|
412 |
+
|
413 |
+
if($normal0)
|
414 |
+
{
|
415 |
+
if($normal1)
|
416 |
+
$normal = $normal0.' && '.$normal1;
|
417 |
+
else
|
418 |
+
$normal = $normal0;
|
419 |
+
}
|
420 |
+
else
|
421 |
+
{
|
422 |
+
if($normal1)
|
423 |
+
$normal = $normal1;
|
424 |
+
}
|
425 |
+
}
|
426 |
+
else
|
427 |
+
{
|
428 |
+
$extended = $extended0;
|
429 |
+
$normal = $normal0;
|
430 |
+
}
|
431 |
+
}
|
432 |
+
}
|
433 |
+
|
434 |
+
if($extended!="" && $normal!="")
|
435 |
+
$if .= ' ((jQuery("#wdform_'.$params_value[0].'_element_title'.$form_id.'").length != 0 || jQuery("#wdform_'.$params_value[0].'_element_middle'.$form_id.'").length != 0) ? '.$extended.' : '.$normal.') ';
|
436 |
+
else
|
437 |
+
$if .= ' true';
|
438 |
}
|
|
|
|
|
|
|
439 |
else
|
|
|
|
|
|
|
440 |
{
|
441 |
if($params_value[1] == "=" || $params_value[1] == "!")
|
442 |
{
|
445 |
$extended = ' (jQuery("#wdform_'.$params_value[0].'_element_title'.$form_id.'").val()'.$name_empty_or_not.'"" '.$name_and_or.' jQuery("#wdform_'.$params_value[0].'_element_first'.$form_id.'").val()'.$name_empty_or_not.'"" '.$name_and_or.' jQuery("#wdform_'.$params_value[0].'_element_last'.$form_id.'").val()'.$name_empty_or_not.'"" '.$name_and_or.' jQuery("#wdform_'.$params_value[0].'_element_middle'.$form_id.'").val()'.$name_empty_or_not.'"") ';
|
446 |
$normal = ' (jQuery("#wdform_'.$params_value[0].'_element_first'.$form_id.'").val()'.$name_empty_or_not.'"" '.$name_and_or.' jQuery("#wdform_'.$params_value[0].'_element_last'.$form_id.'").val()'.$name_empty_or_not.'"") ';
|
447 |
|
448 |
+
$if .= ' ((jQuery("#wdform_'.$params_value[0].'_element_title'.$form_id.'").length != 0 || jQuery("#wdform_'.$params_value[0].'_element_middle'.$form_id.'").length != 0) ? '.$extended.' : '.$normal.') ';
|
449 |
}
|
450 |
else
|
451 |
{
|
631 |
}
|
632 |
|
633 |
if($extended!="" && $normal!="")
|
634 |
+
$if .= ' ((jQuery("#wdform_'.$params_value[0].'_element_title'.$form_id.'").length != 0 || jQuery("#wdform_'.$params_value[0].'_element_middle'.$form_id.'").length != 0) ? '.$extended.' : '.$normal.') ';
|
635 |
else
|
636 |
$if .= ' true';
|
637 |
}
|
638 |
}
|
639 |
$keyup .= '#wdform_'.$params_value[0].'_element_title'.$form_id.', #wdform_'.$params_value[0].'_element_first'.$form_id.', #wdform_'.$params_value[0].'_element_last'.$form_id.', #wdform_'.$params_value[0].'_element_middle'.$form_id.', ';
|
640 |
break;
|
|
|
641 |
case "type_phone":
|
642 |
if($params_value[1] == "==" || $params_value[1] == "!=")
|
643 |
{
|
1389 |
break;
|
1390 |
}
|
1391 |
|
1392 |
+
case 'type_name': {
|
1393 |
+
$params_names=array('w_field_label_size','w_field_label_pos','w_first_val','w_title', 'w_mini_labels','w_size','w_name_format','w_required','w_unique', 'w_class', 'w_name_fields');
|
1394 |
$temp=$params;
|
1395 |
foreach($params_names as $params_name ) {
|
1396 |
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
1407 |
|
1408 |
$w_first_val = explode('***',$param['w_first_val']);
|
1409 |
$w_title = explode('***',$param['w_title']);
|
1410 |
+
|
1411 |
$w_mini_labels = explode('***',$param['w_mini_labels']);
|
1412 |
+
$param['w_name_fields'] = $param['w_name_fields']!='' ? $param['w_name_fields'] : ($param['w_name_format'] == 'normal' ? 'no***no' : 'yes***yes');
|
1413 |
+
$w_name_fields = explode('***', $param['w_name_fields']);
|
1414 |
+
|
1415 |
$element_title = isset($_POST['wdform_'.$id1.'_element_title'.$form_id]) ? esc_html(stripslashes($_POST['wdform_'.$id1.'_element_title'.$form_id])) : NULL;
|
1416 |
+
$element_middle = isset($_POST['wdform_'.$id1.'_element_middle'.$form_id]) ? esc_html(stripslashes($_POST['wdform_'.$id1.'_element_middle'.$form_id])) : NULL;
|
1417 |
$element_first = isset($_POST['wdform_'.$id1.'_element_first'.$form_id]) ? esc_html(stripslashes($_POST['wdform_'.$id1.'_element_first'.$form_id])) : NULL;
|
1418 |
+
if(isset($element_title) || isset($element_middle)) {
|
1419 |
+
$param['w_first_val']=(isset($_POST['wdform_'.$id1.'_element_first'.$form_id]) ? esc_html(stripslashes($_POST['wdform_'.$id1.'_element_first'.$form_id])) : $w_first_val[0]).'***'.(isset($_POST['wdform_'.$id1.'_element_last'.$form_id]) ? esc_html(stripslashes($_POST['wdform_'.$id1.'_element_last'.$form_id])) : $w_first_val[1]).'***'.(isset($_POST['wdform_'.$id1.'_element_title'.$form_id]) ? esc_html(stripslashes($_POST['wdform_'.$id1.'_element_title'.$form_id])) : $w_first_val[2]).'***'.(isset($_POST['wdform_'.$id1.'_element_middle'.$form_id]) ? esc_html(stripslashes($_POST['wdform_'.$id1.'_element_middle'.$form_id])) : $w_first_val[3]);
|
1420 |
}
|
1421 |
else {
|
1422 |
if(isset($element_first)) {
|
1423 |
$param['w_first_val']=(isset($_POST['wdform_'.$id1.'_element_first'.$form_id]) ? esc_html(stripslashes($_POST['wdform_'.$id1.'_element_first'.$form_id])) : $w_first_val[0]).'***'.(isset($_POST['wdform_'.$id1.'_element_last'.$form_id]) ? esc_html(stripslashes($_POST['wdform_'.$id1.'_element_last'.$form_id])) : $w_first_val[1]);
|
1424 |
}
|
1425 |
}
|
1426 |
+
|
1427 |
$required = ($param['w_required']=="yes" ? true : false);
|
|
|
1428 |
$w_first_val = explode('***',$param['w_first_val']);
|
1429 |
+
|
1430 |
+
if($w_name_fields[0]== 'no' && $w_name_fields[1]== 'no' ) {
|
1431 |
+
$w_name_format = '
|
1432 |
+
<div style="display: table-cell; width:50%">
|
1433 |
+
<div><input type="text" class="'.($w_first_val[0] == $w_title[0] ? "input_deactive" : "input_active").'" id="wdform_'.$id1.'_element_first'.$form_id.'" name="wdform_'.$id1.'_element_first'.$form_id.'" value="'.$w_first_val[0].'" title="'.$w_title[0].'" style="width: 100%;"'.$param['attributes'].'></div>
|
1434 |
+
<div><label class="mini_label">'.$w_mini_labels[1].'</label></div>
|
1435 |
+
</div>
|
1436 |
+
<div style="display:table-cell;"><div style="margin: 0px 8px; padding: 0px;"></div></div>
|
1437 |
+
<div style="display: table-cell; width:50%">
|
1438 |
+
<div><input type="text" class="'.($w_first_val[1] == $w_title[1] ? "input_deactive" : "input_active").'" id="wdform_'.$id1.'_element_last'.$form_id.'" name="wdform_'.$id1.'_element_last'.$form_id.'" value="'.$w_first_val[1].'" title="'.$w_title[1].'" style="width: 100%;" '.$param['attributes'].'></div>
|
1439 |
+
<div><label class="mini_label">'.$w_mini_labels[2].'</label></div>
|
1440 |
+
</div>
|
1441 |
+
';
|
1442 |
+
$w_size=2*$param['w_size'];
|
1443 |
+
}
|
1444 |
else {
|
1445 |
+
$first_last_size = $w_name_fields[0] == 'yes' && $w_name_fields[1] == 'no' ? 45 : 30;
|
1446 |
+
$w_name_format = '
|
1447 |
+
<div style="display: table-cell; width:'.$first_last_size.'%">
|
1448 |
+
<div><input type="text" class="'.($w_first_val[0] == $w_title[0] ? "input_deactive" : "input_active").'" id="wdform_'.$id1.'_element_first'.$form_id.'" name="wdform_'.$id1.'_element_first'.$form_id.'" value="'.$w_first_val[0].'" title="'.$w_title[0].'" style="width:100%;"></div>
|
1449 |
+
<div><label class="mini_label">'.$w_mini_labels[1].'</label></div>
|
1450 |
+
</div>
|
1451 |
+
<div style="display:table-cell;"><div style="margin: 0px 4px; padding: 0px;"></div></div>
|
1452 |
+
<div style="display: table-cell; width:'.$first_last_size.'%">
|
1453 |
+
<div><input type="text" class="'.($w_first_val[1] == $w_title[1] ? "input_deactive" : "input_active").'" id="wdform_'.$id1.'_element_last'.$form_id.'" name="wdform_'.$id1.'_element_last'.$form_id.'" value="'.$w_first_val[1].'" title="'.$w_title[1].'" style="width: 100%;"></div>
|
1454 |
+
<div><label class="mini_label">'.$w_mini_labels[2].'</label></div>
|
1455 |
+
</div>';
|
1456 |
+
|
1457 |
+
$w_size = 2*$param['w_size'];
|
1458 |
+
if($w_name_fields[0] == 'yes') {
|
1459 |
+
$w_name_format = '
|
1460 |
+
<div style="display: table-cell;">
|
1461 |
+
<div><input type="text" class="'.($w_first_val[2] == $w_title[2] ? "input_deactive" : "input_active").'" id="wdform_'.$id1.'_element_title'.$form_id.'" name="wdform_'.$id1.'_element_title'.$form_id.'" value="'.$w_first_val[2].'" title="'.$w_title[2].'" style="width: 40px;"></div>
|
1462 |
+
<div><label class="mini_label">'.$w_mini_labels[0].'</label></div>
|
1463 |
+
</div>
|
1464 |
+
<div style="display:table-cell;"><div style="margin: 0px 1px; padding: 0px;"></div></div>'.$w_name_format;
|
1465 |
+
$w_size += 80;
|
1466 |
+
}
|
1467 |
+
if($w_name_fields[1] == 'yes') {
|
1468 |
+
$w_name_format = $w_name_format.'
|
1469 |
+
<div style="display:table-cell;"><div style="margin: 0px 4px; padding: 0px;"></div></div>
|
1470 |
+
<div style="display: table-cell; width:30%">
|
1471 |
+
<div><input type="text" class="'.($w_first_val[3] == $w_title[3] ? "input_deactive" : "input_active").'" id="wdform_'.$id1.'_element_middle'.$form_id.'" name="wdform_'.$id1.'_element_middle'.$form_id.'" value="'.$w_first_val[3].'" title="'.$w_title[3].'" style="width: 100%;"></div>
|
1472 |
+
<div><label class="mini_label">'.$w_mini_labels[3].'</label></div>
|
1473 |
+
</div>
|
1474 |
+
';
|
1475 |
+
$w_size += $param['w_size'];
|
1476 |
+
}
|
1477 |
}
|
1478 |
|
1479 |
$wdformfieldsize = ($param['w_field_label_pos']=="left" ? ($param['w_field_label_size']+$w_size) : max($param['w_field_label_size'],$w_size));
|
1488 |
<div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos2'].' width: '.$w_size.'px;">'.$w_name_format.'</div></div>';
|
1489 |
|
1490 |
if($required) {
|
|
|
1491 |
$check_js.='
|
1492 |
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
1493 |
{
|
1494 |
+
if(jQuery("#wdform_'.$id1.'_element_first'.$form_id.'").val()=="'.$w_title[0].'" || jQuery("#wdform_'.$id1.'_element_first'.$form_id.'").val()=="" || jQuery("#wdform_'.$id1.'_element_last'.$form_id.'").val()=="'.$w_title[1].'" || jQuery("#wdform_'.$id1.'_element_last'.$form_id.'").val()=="" || (jQuery("#wdform_'.$id1.'_element_title'.$form_id.'").length != 0 && (jQuery("#wdform_'.$id1.'_element_title'.$form_id.'").val()=="'.$w_title[2].'" || jQuery("#wdform_'.$id1.'_element_title'.$form_id.'").val()=="")) || (jQuery("#wdform_'.$id1.'_element_middle'.$form_id.'").length != 0 && (jQuery("#wdform_'.$id1.'_element_middle'.$form_id.'").val()=="'.$w_title[3].'" || jQuery("#wdform_'.$id1.'_element_middle'.$form_id.'").val()=="")))
|
1495 |
{
|
1496 |
+
alert("' .addslashes($label. ' ' . __('field is required.', 'form_maker')) . '");
|
1497 |
+
old_bg=x.find(jQuery("div[wdid='.$id1.']")).css("background-color");
|
1498 |
+
x.find(jQuery("div[wdid='.$id1.']")).effect( "shake", {}, 500 ).css("background-color","#FF8F8B").animate({backgroundColor: old_bg}, {duration: 500, queue: false });
|
1499 |
+
jQuery("#wdform_'.$id1.'_element_first'.$form_id.'").focus();
|
1500 |
+
return false;
|
1501 |
}
|
1502 |
}
|
1503 |
';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1504 |
}
|
1505 |
+
break;
|
1506 |
}
|
1507 |
|
1508 |
case 'type_address': {
|
js/formmaker_div_free.js
CHANGED
@@ -3,7 +3,7 @@ var c;
|
|
3 |
var need_enable=true;;
|
4 |
var a = new Array();
|
5 |
//var plugin_url = "";
|
6 |
-
var count_of_fields_form =
|
7 |
|
8 |
if (ajaxurl.indexOf("://") != -1) {
|
9 |
var url_for_ajax = ajaxurl;
|
@@ -885,18 +885,22 @@ function refresh_id_name(i, type)
|
|
885 |
}
|
886 |
case 'type_name':
|
887 |
{
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
|
|
|
|
|
|
|
|
897 |
}
|
898 |
-
|
899 |
-
break
|
900 |
}
|
901 |
case 'type_range':
|
902 |
{
|
@@ -1472,6 +1476,135 @@ refresh_attr(id,type);
|
|
1472 |
|
1473 |
|
1474 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1475 |
|
1476 |
|
1477 |
function set_unique(id)
|
@@ -8828,7 +8961,7 @@ function hide_show_cents(hide, id)
|
|
8828 |
}
|
8829 |
}
|
8830 |
|
8831 |
-
function type_name(i, w_field_label, w_field_label_size, w_field_label_pos, w_first_val, w_title, w_mini_labels, w_size, w_name_format, w_required, w_unique, w_class, w_attr_name, w_attr_value) {
|
8832 |
document.getElementById("element_type").value="type_name";
|
8833 |
|
8834 |
delete_last_child();
|
@@ -8845,6 +8978,7 @@ function type_name(i, w_field_label, w_field_label_size, w_field_label_pos, w_fi
|
|
8845 |
var edit_main_tr1 = document.createElement('tr');
|
8846 |
var edit_main_tr2 = document.createElement('tr');
|
8847 |
var edit_main_tr3 = document.createElement('tr');
|
|
|
8848 |
var edit_main_tr4 = document.createElement('tr');
|
8849 |
var edit_main_tr5 = document.createElement('tr');
|
8850 |
var edit_main_tr6 = document.createElement('tr');
|
@@ -8852,6 +8986,7 @@ function type_name(i, w_field_label, w_field_label_size, w_field_label_pos, w_fi
|
|
8852 |
var edit_main_tr8 = document.createElement('tr');
|
8853 |
var edit_main_tr9 = document.createElement('tr');
|
8854 |
var edit_main_tr10 = document.createElement('tr');
|
|
|
8855 |
var edit_main_td1 = document.createElement('td');
|
8856 |
var edit_main_td1_1 = document.createElement('td');
|
8857 |
var edit_main_td2 = document.createElement('td');
|
@@ -8872,17 +9007,19 @@ function type_name(i, w_field_label, w_field_label_size, w_field_label_pos, w_fi
|
|
8872 |
var edit_main_td9_1 = document.createElement('td');
|
8873 |
var edit_main_td10 = document.createElement('td');
|
8874 |
var edit_main_td10_1 = document.createElement('td');
|
|
|
|
|
8875 |
|
8876 |
var el_label_label = document.createElement('label');
|
8877 |
-
|
8878 |
-
|
8879 |
|
8880 |
var el_label_textarea = document.createElement('textarea');
|
8881 |
-
|
8882 |
-
|
8883 |
-
|
8884 |
-
|
8885 |
-
|
8886 |
|
8887 |
var el_label_size_label = document.createElement('label');
|
8888 |
el_label_size_label.setAttribute("for", "edit_for_label_size");
|
@@ -8896,26 +9033,26 @@ function type_name(i, w_field_label, w_field_label_size, w_field_label_pos, w_fi
|
|
8896 |
el_label_size.setAttribute("onKeyUp", "change_w_style('"+i+"_label_sectionform_id_temp', this.value)");
|
8897 |
|
8898 |
var el_label_position_label = document.createElement('label');
|
8899 |
-
|
8900 |
|
8901 |
var el_label_position1 = document.createElement('input');
|
8902 |
-
|
8903 |
-
|
8904 |
-
|
8905 |
-
|
8906 |
Left = document.createTextNode("Left");
|
8907 |
|
8908 |
var el_label_position2 = document.createElement('input');
|
8909 |
-
|
8910 |
-
|
8911 |
-
|
8912 |
-
|
8913 |
Top = document.createTextNode("Top");
|
8914 |
|
8915 |
if(w_field_label_pos=="top")
|
8916 |
-
|
8917 |
else
|
8918 |
-
|
8919 |
|
8920 |
var gic = document.createTextNode("-");
|
8921 |
|
@@ -8924,122 +9061,159 @@ function type_name(i, w_field_label, w_field_label_size, w_field_label_pos, w_fi
|
|
8924 |
el_first_value_label.innerHTML = "Value if empty ";
|
8925 |
|
8926 |
var el_first_value_first = document.createElement('input');
|
8927 |
-
|
8928 |
-
|
8929 |
-
|
8930 |
-
|
8931 |
-
|
8932 |
|
8933 |
var el_first_value_last = document.createElement('input');
|
8934 |
-
|
8935 |
-
|
8936 |
-
|
8937 |
-
|
8938 |
-
|
8939 |
|
8940 |
var el_size_label = document.createElement('label');
|
8941 |
-
|
8942 |
-
|
8943 |
var el_size = document.createElement('input');
|
8944 |
-
|
8945 |
-
|
8946 |
-
|
8947 |
-
|
8948 |
-
|
8949 |
-
el_size.setAttribute("onKeyPress", "return check_isnum(event)");
|
8950 |
-
el_size.setAttribute("onKeyUp", "change_w_style('"+i+"_element_firstform_id_temp', this.value); change_w_style('"+i+"_element_lastform_id_temp', this.value); change_w_style('"+i+"_element_middleform_id_temp', this.value)");
|
8951 |
-
|
8952 |
|
8953 |
var el_format_label = document.createElement('label');
|
8954 |
-
|
8955 |
el_format_label.innerHTML = "Name Format";
|
8956 |
|
8957 |
var el_format_normal = document.createElement('input');
|
8958 |
-
|
8959 |
-
|
8960 |
-
|
8961 |
el_format_normal.setAttribute("name", "edit_for_name_format");
|
8962 |
-
|
8963 |
el_format_normal.setAttribute("checked", "checked");
|
8964 |
Normal = document.createTextNode("Normal");
|
8965 |
|
8966 |
var el_format_extended = document.createElement('input');
|
8967 |
-
|
8968 |
-
|
8969 |
-
|
8970 |
el_format_extended.setAttribute("name", "edit_for_name_format");
|
8971 |
-
|
8972 |
Extended = document.createTextNode("Extended");
|
8973 |
|
8974 |
if(w_name_format=="normal")
|
8975 |
-
|
8976 |
-
el_format_normal.setAttribute("checked", "checked");
|
8977 |
else
|
8978 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8979 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8980 |
var el_required_label = document.createElement('label');
|
8981 |
-
|
8982 |
el_required_label.innerHTML = "Required";
|
8983 |
|
8984 |
var el_required = document.createElement('input');
|
8985 |
-
|
8986 |
-
|
8987 |
-
|
8988 |
-
|
8989 |
-
|
8990 |
-
el_required.setAttribute("checked", "checked");
|
8991 |
|
8992 |
var el_unique_label = document.createElement('label');
|
8993 |
el_unique_label.setAttribute("for", "el_unique");
|
8994 |
el_unique_label.innerHTML = "Allow only unique values";
|
8995 |
|
8996 |
var el_unique = document.createElement('input');
|
8997 |
-
|
8998 |
-
|
8999 |
-
|
9000 |
-
|
9001 |
-
|
9002 |
-
el_unique.setAttribute("checked", "checked");
|
9003 |
|
9004 |
var el_style_label = document.createElement('label');
|
9005 |
-
|
9006 |
-
|
9007 |
|
9008 |
var el_style_textarea = document.createElement('input');
|
9009 |
-
|
9010 |
-
|
9011 |
-
|
9012 |
-
|
9013 |
-
|
9014 |
|
9015 |
var el_attr_label = document.createElement('label');
|
9016 |
-
|
9017 |
-
el_attr_label.innerHTML = "Additional Attributes";
|
9018 |
var el_attr_add = document.createElement('img');
|
9019 |
-
|
9020 |
-
|
9021 |
-
|
9022 |
-
|
9023 |
-
el_attr_add.setAttribute("onClick", "add_attr("+i+", 'type_name')");
|
9024 |
var el_attr_table = document.createElement('table');
|
9025 |
-
|
9026 |
-
|
9027 |
-
|
9028 |
var el_attr_tr_label = document.createElement('tr');
|
9029 |
-
|
9030 |
var el_attr_td_name_label = document.createElement('th');
|
9031 |
-
|
9032 |
var el_attr_td_value_label = document.createElement('th');
|
9033 |
-
|
9034 |
var el_attr_td_X_label = document.createElement('th');
|
9035 |
-
|
9036 |
var el_attr_name_label = document.createElement('label');
|
9037 |
-
|
9038 |
-
|
9039 |
|
9040 |
var el_attr_value_label = document.createElement('label');
|
9041 |
-
|
9042 |
-
|
9043 |
|
9044 |
el_attr_table.appendChild(el_attr_tr_label);
|
9045 |
el_attr_tr_label.appendChild(el_attr_td_name_label);
|
@@ -9061,18 +9235,14 @@ function type_name(i, w_field_label, w_field_label_size, w_field_label_pos, w_fi
|
|
9061 |
|
9062 |
var el_attr_td_X = document.createElement('td');
|
9063 |
var el_attr_name = document.createElement('input');
|
9064 |
-
|
9065 |
el_attr_name.setAttribute("type", "text");
|
9066 |
-
|
9067 |
el_attr_name.style.cssText = "width:100px";
|
9068 |
el_attr_name.setAttribute("value", w_attr_name[j-1]);
|
9069 |
el_attr_name.setAttribute("id", "attr_name"+j);
|
9070 |
el_attr_name.setAttribute("onChange", "change_attribute_name("+i+", this, 'type_name')");
|
9071 |
|
9072 |
var el_attr_value = document.createElement('input');
|
9073 |
-
|
9074 |
el_attr_value.setAttribute("type", "text");
|
9075 |
-
|
9076 |
el_attr_value.style.cssText = "width:100px";
|
9077 |
el_attr_value.setAttribute("value", w_attr_value[j-1]);
|
9078 |
el_attr_value.setAttribute("id", "attr_value"+j);
|
@@ -9083,7 +9253,7 @@ function type_name(i, w_field_label, w_field_label_size, w_field_label_pos, w_fi
|
|
9083 |
el_attr_remove.setAttribute("src", plugin_url + '/images/delete.png');
|
9084 |
el_attr_remove.style.cssText = 'cursor:pointer; vertical-align:middle; margin:3px';
|
9085 |
|
9086 |
-
|
9087 |
el_attr_table.appendChild(el_attr_tr);
|
9088 |
el_attr_tr.appendChild(el_attr_td_name);
|
9089 |
el_attr_tr.appendChild(el_attr_td_value);
|
@@ -9091,12 +9261,9 @@ function type_name(i, w_field_label, w_field_label_size, w_field_label_pos, w_fi
|
|
9091 |
el_attr_td_name.appendChild(el_attr_name);
|
9092 |
el_attr_td_value.appendChild(el_attr_value);
|
9093 |
el_attr_td_X.appendChild(el_attr_remove);
|
9094 |
-
|
9095 |
}
|
9096 |
|
9097 |
-
|
9098 |
var t = document.getElementById('edit_table');
|
9099 |
-
|
9100 |
var br = document.createElement('br');
|
9101 |
var br1 = document.createElement('br');
|
9102 |
var br2 = document.createElement('br');
|
@@ -9104,6 +9271,8 @@ function type_name(i, w_field_label, w_field_label_size, w_field_label_pos, w_fi
|
|
9104 |
var br4 = document.createElement('br');
|
9105 |
var br5 = document.createElement('br');
|
9106 |
var br6 = document.createElement('br');
|
|
|
|
|
9107 |
|
9108 |
edit_main_td1.appendChild(el_label_label);
|
9109 |
edit_main_td1_1.appendChild(el_label_textarea);
|
@@ -9114,7 +9283,7 @@ function type_name(i, w_field_label, w_field_label_size, w_field_label_pos, w_fi
|
|
9114 |
edit_main_td2.appendChild(el_label_position_label);
|
9115 |
edit_main_td2_1.appendChild(el_label_position1);
|
9116 |
edit_main_td2_1.appendChild(Left);
|
9117 |
-
edit_main_td2_1.appendChild(
|
9118 |
edit_main_td2_1.appendChild(el_label_position2);
|
9119 |
edit_main_td2_1.appendChild(Top);
|
9120 |
|
@@ -9123,19 +9292,33 @@ function type_name(i, w_field_label, w_field_label_size, w_field_label_pos, w_fi
|
|
9123 |
edit_main_td9_1.appendChild(gic);
|
9124 |
edit_main_td9_1.appendChild(el_first_value_last);
|
9125 |
|
9126 |
-
|
9127 |
-
|
9128 |
edit_main_td7.appendChild(el_size_label);
|
9129 |
edit_main_td7_1.appendChild(el_size);
|
9130 |
|
9131 |
edit_main_td3.appendChild(el_format_label);
|
9132 |
-
|
9133 |
edit_main_td3_1.appendChild(el_format_normal);
|
9134 |
edit_main_td3_1.appendChild(Normal);
|
9135 |
-
edit_main_td3_1.appendChild(
|
9136 |
edit_main_td3_1.appendChild(el_format_extended);
|
9137 |
edit_main_td3_1.appendChild(Extended);
|
9138 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9139 |
edit_main_td4.appendChild(el_style_label);
|
9140 |
edit_main_td4_1.appendChild(el_style_textarea);
|
9141 |
|
@@ -9147,7 +9330,7 @@ function type_name(i, w_field_label, w_field_label_size, w_field_label_pos, w_fi
|
|
9147 |
|
9148 |
edit_main_td6.appendChild(el_attr_label);
|
9149 |
edit_main_td6.appendChild(el_attr_add);
|
9150 |
-
edit_main_td6.appendChild(
|
9151 |
edit_main_td6.appendChild(el_attr_table);
|
9152 |
edit_main_td6.setAttribute("colspan", "2");
|
9153 |
|
@@ -9161,6 +9344,8 @@ function type_name(i, w_field_label, w_field_label_size, w_field_label_pos, w_fi
|
|
9161 |
edit_main_tr7.appendChild(edit_main_td7_1);
|
9162 |
edit_main_tr3.appendChild(edit_main_td3);
|
9163 |
edit_main_tr3.appendChild(edit_main_td3_1);
|
|
|
|
|
9164 |
edit_main_tr4.appendChild(edit_main_td4);
|
9165 |
edit_main_tr4.appendChild(edit_main_td4_1);
|
9166 |
edit_main_tr5.appendChild(edit_main_td5);
|
@@ -9178,6 +9363,7 @@ function type_name(i, w_field_label, w_field_label_size, w_field_label_pos, w_fi
|
|
9178 |
edit_main_table.appendChild(edit_main_tr9);
|
9179 |
edit_main_table.appendChild(edit_main_tr7);
|
9180 |
edit_main_table.appendChild(edit_main_tr3);
|
|
|
9181 |
edit_main_table.appendChild(edit_main_tr4);
|
9182 |
edit_main_table.appendChild(edit_main_tr5);
|
9183 |
edit_main_table.appendChild(edit_main_tr8);
|
@@ -9186,109 +9372,108 @@ function type_name(i, w_field_label, w_field_label_size, w_field_label_pos, w_fi
|
|
9186 |
|
9187 |
t.appendChild(edit_div);
|
9188 |
add_id_and_name(i, 'type_name');
|
9189 |
-
|
9190 |
//show table
|
9191 |
|
9192 |
var adding_type = document.createElement("input");
|
9193 |
-
|
9194 |
-
|
9195 |
-
|
9196 |
-
|
9197 |
var adding_required= document.createElement("input");
|
9198 |
-
|
9199 |
-
|
9200 |
-
|
9201 |
-
|
9202 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9203 |
var adding_unique= document.createElement("input");
|
9204 |
-
|
9205 |
-
|
9206 |
-
|
9207 |
-
|
9208 |
-
|
9209 |
-
|
9210 |
-
div.setAttribute("id", "main_div");
|
9211 |
-
var div_for_editable_labels = document.createElement('div');
|
9212 |
-
div_for_editable_labels.setAttribute("style", "margin-left:4px; color:red;");
|
9213 |
-
|
9214 |
-
edit_labels = document.createTextNode("The labels of the fields are editable. Please, click the label to edit.");
|
9215 |
|
|
|
|
|
|
|
|
|
9216 |
div_for_editable_labels.appendChild(edit_labels);
|
9217 |
|
9218 |
-
|
|
|
9219 |
|
9220 |
-
|
9221 |
-
|
9222 |
-
|
9223 |
-
|
9224 |
-
|
9225 |
-
div_label.style.display="table-cell";
|
9226 |
-
div_label.style.width=w_field_label_size +"px";
|
9227 |
-
div_label.setAttribute("id", i+"_label_sectionform_id_temp");
|
9228 |
-
|
9229 |
-
var div_element = document.createElement('div');
|
9230 |
-
div_element.setAttribute("align", 'left');
|
9231 |
-
div_element.style.display="table-cell";
|
9232 |
-
div_element.setAttribute("id", i+"_element_sectionform_id_temp");
|
9233 |
-
|
9234 |
-
var table_name = document.createElement('div');
|
9235 |
-
table_name.style.display="table";
|
9236 |
-
table_name.setAttribute("id", i+"_table_name");
|
9237 |
-
table_name.setAttribute("cellpadding", '0');
|
9238 |
-
table_name.setAttribute("cellspacing", '0');
|
9239 |
-
|
9240 |
-
var tr_name1 = document.createElement('div');
|
9241 |
-
tr_name1.style.display="table-row";
|
9242 |
-
tr_name1.setAttribute("id", i+"_tr_name1");
|
9243 |
-
|
9244 |
-
var tr_name2 = document.createElement('div');
|
9245 |
-
tr_name2.style.display="table-row";
|
9246 |
-
tr_name2.setAttribute("id", i+"_tr_name2");
|
9247 |
-
|
9248 |
-
var td_name_input1 = document.createElement('div');
|
9249 |
-
td_name_input1.style.display="table-cell";
|
9250 |
-
td_name_input1.setAttribute("id", i+"_td_name_input_first");
|
9251 |
-
|
9252 |
-
var td_name_input2 = document.createElement('div');
|
9253 |
-
td_name_input2.style.display="table-cell";
|
9254 |
-
td_name_input2.setAttribute("id", i+"_td_name_input_last");
|
9255 |
|
9256 |
-
|
9257 |
-
|
9258 |
-
|
9259 |
-
|
9260 |
-
|
9261 |
-
|
9262 |
-
|
9263 |
-
|
9264 |
-
|
9265 |
-
|
9266 |
-
|
9267 |
-
|
9268 |
-
|
9269 |
-
|
9270 |
-
|
9271 |
-
|
9272 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9273 |
label.setAttribute("id", i+"_element_labelform_id_temp");
|
9274 |
label.innerHTML = w_field_label;
|
9275 |
label.setAttribute("class", "label");
|
9276 |
label.style.verticalAlign="top";
|
9277 |
-
|
9278 |
-
|
9279 |
-
|
9280 |
-
|
9281 |
-
|
9282 |
-
|
9283 |
-
|
9284 |
-
required.innerHTML = " *";
|
|
|
9285 |
var first = document.createElement('input');
|
9286 |
-
|
9287 |
if(w_title[0]==w_first_val[0])
|
9288 |
first.setAttribute("class", "input_deactive");
|
9289 |
else
|
9290 |
first.setAttribute("class", "input_active");
|
9291 |
-
|
9292 |
first.style.cssText = "margin-right: 10px; width:"+w_size+"px";
|
9293 |
first.setAttribute("id", i+"_element_firstform_id_temp");
|
9294 |
first.setAttribute("name", i+"_element_firstform_id_temp");
|
@@ -9305,93 +9490,98 @@ function type_name(i, w_field_label, w_field_label_size, w_field_label_pos, w_fi
|
|
9305 |
|
9306 |
var last = document.createElement('input');
|
9307 |
last.setAttribute("type", 'text');
|
9308 |
-
|
9309 |
-
if(w_title[1]==w_first_val[1])
|
9310 |
last.setAttribute("class", "input_deactive");
|
9311 |
else
|
9312 |
last.setAttribute("class", "input_active");
|
9313 |
-
|
9314 |
last.style.cssText = "margin-right: 10px; width:"+w_size+"px";
|
9315 |
last.setAttribute("id", i+"_element_lastform_id_temp");
|
9316 |
-
|
9317 |
last.setAttribute("value", w_first_val[1]);
|
9318 |
last.setAttribute("title", w_title[1]);
|
9319 |
last.setAttribute("onFocus", 'delete_value("'+i+'_element_lastform_id_temp")');
|
9320 |
last.setAttribute("onBlur", 'return_value("'+i+'_element_lastform_id_temp")');
|
9321 |
last.setAttribute("onChange", "change_value('"+i+"_element_lastform_id_temp')");
|
9322 |
|
9323 |
-
|
9324 |
var last_label = document.createElement('label');
|
9325 |
last_label.setAttribute("class", "mini_label");
|
9326 |
last_label.setAttribute("id", i+"_mini_label_last");
|
9327 |
last_label.innerHTML= w_mini_labels[2];
|
9328 |
|
9329 |
-
|
9330 |
-
|
9331 |
-
div_label.appendChild(label);
|
9332 |
-
div_label.appendChild(required );
|
9333 |
-
|
9334 |
-
td_name_input1.appendChild(first);
|
9335 |
-
td_name_input2.appendChild(last);
|
9336 |
-
tr_name1.appendChild(td_name_input1);
|
9337 |
-
tr_name1.appendChild(td_name_input2);
|
9338 |
-
|
9339 |
-
td_name_label1.appendChild(first_label);
|
9340 |
-
td_name_label2.appendChild(last_label);
|
9341 |
-
tr_name2.appendChild(td_name_label1);
|
9342 |
-
tr_name2.appendChild(td_name_label2);
|
9343 |
-
table_name.appendChild(tr_name1);
|
9344 |
-
table_name.appendChild(tr_name2);
|
9345 |
-
|
9346 |
-
div_element.appendChild(adding_type);
|
9347 |
-
div_element.appendChild(adding_required);
|
9348 |
-
div_element.appendChild(adding_unique);
|
9349 |
-
div_element.appendChild(table_name);
|
9350 |
-
div_field.appendChild(div_label);
|
9351 |
-
div_field.appendChild(div_element);
|
9352 |
|
9353 |
-
|
9354 |
-
|
9355 |
-
|
9356 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9357 |
|
9358 |
if(w_field_label_pos=="top")
|
9359 |
-
|
9360 |
|
9361 |
-
if(w_name_format=="extended")
|
9362 |
-
|
9363 |
-
|
9364 |
-
|
9365 |
-
|
9366 |
-
|
9367 |
-
|
9368 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
9369 |
jQuery(this).html(first);
|
9370 |
jQuery("input.first").focus();
|
9371 |
jQuery("input.first").blur(function() {
|
9372 |
-
|
9373 |
-
|
9374 |
-
|
9375 |
-
|
9376 |
-
|
9377 |
-
|
9378 |
-
});
|
9379 |
-
|
9380 |
|
9381 |
-
|
9382 |
-
|
9383 |
-
|
9384 |
-
|
9385 |
-
|
9386 |
-
|
9387 |
-
|
9388 |
-
|
9389 |
-
|
9390 |
-
|
9391 |
-
|
9392 |
-
|
9393 |
});
|
9394 |
|
|
|
|
|
9395 |
}
|
9396 |
|
9397 |
function type_address(i, w_field_label, w_field_label_size, w_field_label_pos, w_size, w_mini_labels, w_disabled_fields, w_required, w_class, w_attr_name, w_attr_value) {
|
@@ -26168,16 +26358,15 @@ function go_to_type_wdeditor(new_id)
|
|
26168 |
type_wdeditor(new_id,'Editor:', '100', 'left', '380', '200', '', 'no', '',w_attr_name, w_attr_value)
|
26169 |
}
|
26170 |
|
26171 |
-
|
26172 |
-
|
26173 |
function go_to_type_name(new_id)
|
26174 |
{
|
26175 |
-
w_attr_name=[];
|
26176 |
-
w_attr_value=[];
|
26177 |
-
w_first_val=['',''];
|
26178 |
-
w_title=['',''];
|
26179 |
-
w_mini_labels=['Title','First','Last','Middle'];
|
26180 |
-
|
|
|
26181 |
}
|
26182 |
|
26183 |
function go_to_type_address(new_id)
|
@@ -27340,12 +27529,12 @@ function vorchjogen() {
|
|
27340 |
is7++;
|
27341 |
}
|
27342 |
}
|
27343 |
-
if (is7 >=
|
27344 |
break;
|
27345 |
}
|
27346 |
}
|
27347 |
-
if (is7 >=
|
27348 |
-
alert("The free version is limited up to
|
27349 |
return true;
|
27350 |
}
|
27351 |
return false;
|
@@ -28721,45 +28910,60 @@ function edit(id)
|
|
28721 |
}
|
28722 |
case 'type_name':
|
28723 |
{
|
28724 |
-
if(document.getElementById(id+
|
28725 |
-
w_name_format="extended";
|
28726 |
-
else
|
28727 |
w_name_format="normal";
|
28728 |
-
|
28729 |
-
|
28730 |
-
|
28731 |
-
|
28732 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
28733 |
}
|
28734 |
else
|
28735 |
{
|
28736 |
-
|
28737 |
-
|
28738 |
-
|
|
|
28739 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28740 |
}
|
28741 |
-
|
28742 |
if(document.getElementById(id+"_mini_label_title"))
|
28743 |
-
|
28744 |
else
|
28745 |
-
|
28746 |
-
|
28747 |
-
|
28748 |
-
|
28749 |
if(document.getElementById(id+"_mini_label_middle"))
|
28750 |
-
|
28751 |
else
|
28752 |
-
|
28753 |
-
|
28754 |
-
w_mini_labels = [w_mini_title, document.getElementById(id+"_mini_label_first").innerHTML,document.getElementById(id+"_mini_label_last").innerHTML, w_mini_middle];
|
28755 |
-
|
28756 |
|
|
|
|
|
|
|
|
|
|
|
28757 |
s=document.getElementById(id+"_element_firstform_id_temp").style.width;
|
28758 |
w_size=s.substring(0,s.length-2);
|
28759 |
atrs=return_attributes(id+'_element_firstform_id_temp');
|
28760 |
w_attr_name=atrs[0];
|
28761 |
w_attr_value=atrs[1];
|
28762 |
-
|
|
|
|
|
28763 |
}
|
28764 |
|
28765 |
case 'type_paypal_price':
|
@@ -29833,45 +30037,59 @@ function dublicate(id) {
|
|
29833 |
}
|
29834 |
case 'type_name':
|
29835 |
{
|
29836 |
-
if(document.getElementById(id+
|
29837 |
-
w_name_format="extended";
|
29838 |
-
else
|
29839 |
w_name_format="normal";
|
29840 |
-
|
29841 |
-
|
29842 |
-
|
29843 |
-
|
29844 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
29845 |
}
|
29846 |
else
|
29847 |
{
|
29848 |
-
|
29849 |
-
|
29850 |
-
|
|
|
29851 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29852 |
}
|
29853 |
-
|
29854 |
if(document.getElementById(id+"_mini_label_title"))
|
29855 |
-
|
29856 |
else
|
29857 |
-
|
29858 |
-
|
29859 |
-
|
29860 |
-
|
29861 |
if(document.getElementById(id+"_mini_label_middle"))
|
29862 |
-
|
29863 |
else
|
29864 |
-
|
29865 |
-
|
29866 |
-
w_mini_labels = [w_mini_title, document.getElementById(id+"_mini_label_first").innerHTML,document.getElementById(id+"_mini_label_last").innerHTML, w_mini_middle];
|
29867 |
-
|
29868 |
|
|
|
|
|
|
|
|
|
|
|
29869 |
s=document.getElementById(id+"_element_firstform_id_temp").style.width;
|
29870 |
w_size=s.substring(0,s.length-2);
|
29871 |
atrs=return_attributes(id+'_element_firstform_id_temp');
|
29872 |
w_attr_name=atrs[0];
|
29873 |
w_attr_value=atrs[1];
|
29874 |
-
|
|
|
29875 |
}
|
29876 |
|
29877 |
case 'type_paypal_price':
|
@@ -30971,46 +31189,58 @@ function gen_form_fields()
|
|
30971 |
}
|
30972 |
case 'type_name':
|
30973 |
{
|
30974 |
-
if(document.getElementById(id+
|
30975 |
-
|
30976 |
-
else
|
30977 |
-
w_name_format="normal";
|
30978 |
-
|
30979 |
|
30980 |
-
|
30981 |
-
|
30982 |
-
|
30983 |
-
|
30984 |
-
|
30985 |
-
|
30986 |
-
|
30987 |
-
|
30988 |
-
|
30989 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30990 |
|
30991 |
-
|
30992 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30993 |
if(document.getElementById(id+"_mini_label_title"))
|
30994 |
-
|
30995 |
else
|
30996 |
-
|
30997 |
-
|
30998 |
if(document.getElementById(id+"_mini_label_middle"))
|
30999 |
-
|
31000 |
else
|
31001 |
-
|
31002 |
-
|
31003 |
-
w_mini_labels = [ w_mini_title, document.getElementById(id+"_mini_label_first").innerHTML,document.getElementById(id+"_mini_label_last").innerHTML, w_mini_middle];
|
31004 |
|
31005 |
-
|
31006 |
-
|
31007 |
-
|
31008 |
-
|
31009 |
-
|
31010 |
-
|
31011 |
-
|
31012 |
-
|
31013 |
-
|
|
|
|
|
31014 |
form_fields+=w_field_label+"*:*w_field_label*:*";
|
31015 |
form_fields+=w_field_label_size+"*:*w_field_label_size*:*";
|
31016 |
form_fields+=w_field_label_pos+"*:*w_field_label_pos*:*";
|
@@ -31027,6 +31257,8 @@ function gen_form_fields()
|
|
31027 |
{
|
31028 |
form_fields+=w_attr_name[j]+"="+w_attr_value[j]+"*:*w_attr_name*:*";
|
31029 |
}
|
|
|
|
|
31030 |
form_fields+="*:*new_field*:*";
|
31031 |
break;
|
31032 |
}
|
3 |
var need_enable=true;;
|
4 |
var a = new Array();
|
5 |
//var plugin_url = "";
|
6 |
+
var count_of_fields_form = 9;
|
7 |
|
8 |
if (ajaxurl.indexOf("://") != -1) {
|
9 |
var url_for_ajax = ajaxurl;
|
885 |
}
|
886 |
case 'type_name':
|
887 |
{
|
888 |
+
document.getElementById('field_id').value = 'wdform_'+i+'_element_firstform_id_temp, wdform_'+i+'_element_lastform_id_temp';
|
889 |
+
document.getElementById('field_name').value = 'wdform_'+i+'_element_firstform_id_temp, wdform_'+i+'_element_lastform_id_temp';
|
890 |
+
|
891 |
+
if(document.getElementById(i+'_element_titleform_id_temp')) {
|
892 |
+
document.getElementById('field_id').value = 'wdform_'+i+'_element_titleform_id_temp, ' + document.getElementById('field_id').value;
|
893 |
+
document.getElementById('field_name').value = 'wdform_'+i+'_element_titleform_id_temp, ' + document.getElementById('field_name').value;
|
894 |
+
|
895 |
+
}
|
896 |
+
|
897 |
+
if(document.getElementById(i+'_element_middleform_id_temp')) {
|
898 |
+
document.getElementById('field_id').value = document.getElementById('field_id').value + ', wdform_'+i+'_element_middleform_id_temp';
|
899 |
+
document.getElementById('field_name').value = document.getElementById('field_name').value + ', wdform_'+i+'_element_middleform_id_temp';
|
900 |
+
|
901 |
}
|
902 |
+
|
903 |
+
break;
|
904 |
}
|
905 |
case 'type_range':
|
906 |
{
|
1476 |
|
1477 |
|
1478 |
}
|
1479 |
+
function enable_name_fields(id, field)
|
1480 |
+
{
|
1481 |
+
var index = field == 'title' ? 2 : 3;
|
1482 |
+
tr_name1 = document.getElementById(id+'_tr_name1');
|
1483 |
+
tr_name2 = document.getElementById(id+'_tr_name2');
|
1484 |
+
first_input = document.getElementById(id+'_td_name_input_first');
|
1485 |
+
first_label = document.getElementById(id+'_td_name_label_first');
|
1486 |
+
|
1487 |
+
var input_width = field == 'title' ? '40' : document.getElementById('edit_for_input_size').value;
|
1488 |
+
if(document.getElementById("el_"+field).checked==true)
|
1489 |
+
document.getElementById(id+"_enable_fieldsform_id_temp").setAttribute(field, "yes");
|
1490 |
+
else
|
1491 |
+
document.getElementById(id+"_enable_fieldsform_id_temp").setAttribute(field, "no");
|
1492 |
+
|
1493 |
+
if(document.getElementById(id+'_enable_fieldsform_id_temp').getAttribute(field)=='yes') {
|
1494 |
+
var name_field_td = document.createElement('div');
|
1495 |
+
name_field_td.setAttribute("id", id+"_td_name_input_"+field);
|
1496 |
+
name_field_td.style.cssText = "display:table-cell";
|
1497 |
+
|
1498 |
+
var name_field = document.createElement('input');
|
1499 |
+
name_field.setAttribute("type", 'text');
|
1500 |
+
if(w_title[index]==w_first_val[index]) {
|
1501 |
+
name_field.setAttribute("class", "input_deactive");
|
1502 |
+
name_field.setAttribute("value", w_first_val[index]);
|
1503 |
+
}
|
1504 |
+
else {
|
1505 |
+
name_field.setAttribute("class", "input_active");
|
1506 |
+
name_field.setAttribute("value", w_first_val[index]);
|
1507 |
+
}
|
1508 |
+
name_field.setAttribute("id", id+"_element_"+field+"form_id_temp");
|
1509 |
+
name_field.setAttribute("name", id+"_element_"+field+"form_id_temp");
|
1510 |
+
name_field.setAttribute("value", w_first_val[index]);
|
1511 |
+
name_field.setAttribute("title", w_title[index]);
|
1512 |
+
name_field.setAttribute("onfocus", "delete_value('"+id+"_element_"+field+"form_id_temp')");
|
1513 |
+
name_field.setAttribute("onblur", "return_value('"+id+"_element_"+field+"form_id_temp')");
|
1514 |
+
name_field.setAttribute("onChange", "change_value('"+id+"_element_"+field+"form_id_temp')");
|
1515 |
+
name_field.style.cssText = "margin-right: 10px; width: "+input_width+"px";
|
1516 |
+
|
1517 |
+
var name_field_label_td = document.createElement('div');
|
1518 |
+
name_field_label_td.setAttribute("id", id+"_td_name_label_"+field);
|
1519 |
+
name_field_label_td.style.cssText = "display:table-cell";
|
1520 |
+
|
1521 |
+
var name_field_label = document.createElement('label');
|
1522 |
+
name_field_label.setAttribute("class", "mini_label");
|
1523 |
+
name_field_label.setAttribute("id", id+"_mini_label_"+field);
|
1524 |
+
name_field_label.innerHTML=document.getElementById('el_'+field+"_label").innerHTML;
|
1525 |
+
// w_mini_labels[0] = document.getElementById('el_'+field+"_label").innerHTML;
|
1526 |
+
|
1527 |
+
name_field_td.appendChild(name_field);
|
1528 |
+
name_field_label_td.appendChild(name_field_label);
|
1529 |
+
if(field == 'title') {
|
1530 |
+
tr_name1.insertBefore(name_field_td, first_input);
|
1531 |
+
tr_name2.insertBefore(name_field_label_td, first_label);
|
1532 |
+
}
|
1533 |
+
else {
|
1534 |
+
tr_name1.appendChild(name_field_td);
|
1535 |
+
tr_name2.appendChild(name_field_label_td);
|
1536 |
+
}
|
1537 |
+
}
|
1538 |
+
else{
|
1539 |
+
if(document.getElementById(id+'_td_name_input_'+field)) {
|
1540 |
+
tr_name1.removeChild(document.getElementById(id+'_td_name_input_'+field));
|
1541 |
+
tr_name2.removeChild(document.getElementById(id+'_td_name_label_'+field));
|
1542 |
+
}
|
1543 |
+
}
|
1544 |
+
|
1545 |
+
var gic1 = document.createTextNode("-");
|
1546 |
+
var gic2 = document.createTextNode("-");
|
1547 |
+
|
1548 |
+
var el_first_value= document.createElement('input');
|
1549 |
+
el_first_value.setAttribute("id", "el_first_value_"+field);
|
1550 |
+
el_first_value.setAttribute("type", "text");
|
1551 |
+
el_first_value.setAttribute("value", w_title[index]);
|
1552 |
+
el_first_value.style.cssText = "width:50px; margin-left:4px; margin-right:4px";
|
1553 |
+
el_first_value.setAttribute("onKeyUp", "change_input_value(this.value,'"+id+"_element_"+field+"form_id_temp')");
|
1554 |
+
|
1555 |
+
el_first_value_first = document.getElementById('el_first_value_first');
|
1556 |
+
parent = el_first_value_first.parentNode;
|
1557 |
+
if(document.getElementById(id+'_enable_fieldsform_id_temp').getAttribute(field)=='yes') {
|
1558 |
+
if(field == 'title') {
|
1559 |
+
parent.insertBefore(gic1, el_first_value_first);
|
1560 |
+
parent.insertBefore(el_first_value, gic1);
|
1561 |
+
}
|
1562 |
+
else {
|
1563 |
+
parent.appendChild(gic2);
|
1564 |
+
parent.appendChild(el_first_value);
|
1565 |
+
}
|
1566 |
+
} else {
|
1567 |
+
if(document.getElementById('el_first_value_'+field)) {
|
1568 |
+
if(field == 'title')
|
1569 |
+
parent.removeChild( document.getElementById('el_first_value_title').nextSibling);
|
1570 |
+
else
|
1571 |
+
parent.removeChild( document.getElementById('el_first_value_middle').previousSibling);
|
1572 |
+
parent.removeChild( document.getElementById('el_first_value_'+field));
|
1573 |
+
}
|
1574 |
+
}
|
1575 |
+
|
1576 |
+
refresh_attr(id, 'type_name');
|
1577 |
+
refresh_id_name(id, 'type_name');
|
1578 |
+
|
1579 |
+
jQuery(document).ready(function() {
|
1580 |
+
jQuery("label#"+id+"_mini_label_title").click(function() {
|
1581 |
+
if (jQuery(this).children('input').length == 0) {
|
1582 |
+
var title = "<input type='text' class='title' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
1583 |
+
jQuery(this).html(title);
|
1584 |
+
jQuery("input.title").focus();
|
1585 |
+
jQuery("input.title").blur(function() {
|
1586 |
+
var value = jQuery(this).val();
|
1587 |
+
jQuery("#"+id+"_mini_label_title").text(value);
|
1588 |
+
document.getElementById('el_title_label').innerHTML = value;
|
1589 |
+
});
|
1590 |
+
}
|
1591 |
+
});
|
1592 |
+
|
1593 |
+
jQuery("label#"+id+"_mini_label_middle").click(function() {
|
1594 |
+
if (jQuery(this).children('input').length == 0) {
|
1595 |
+
var middle = "<input type='text' class='middle' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
1596 |
+
jQuery(this).html(middle);
|
1597 |
+
jQuery("input.middle").focus();
|
1598 |
+
jQuery("input.middle").blur(function() {
|
1599 |
+
var value = jQuery(this).val();
|
1600 |
+
jQuery("#"+id+"_mini_label_middle").text(value);
|
1601 |
+
document.getElementById('el_middle_label').innerHTML = value;
|
1602 |
+
});
|
1603 |
+
}
|
1604 |
+
});
|
1605 |
+
});
|
1606 |
+
}
|
1607 |
+
|
1608 |
|
1609 |
|
1610 |
function set_unique(id)
|
8961 |
}
|
8962 |
}
|
8963 |
|
8964 |
+
function type_name(i, w_field_label, w_field_label_size, w_field_label_pos, w_first_val, w_title, w_mini_labels, w_size, w_name_format, w_required, w_unique, w_class, w_attr_name, w_attr_value, w_name_fields) {
|
8965 |
document.getElementById("element_type").value="type_name";
|
8966 |
|
8967 |
delete_last_child();
|
8978 |
var edit_main_tr1 = document.createElement('tr');
|
8979 |
var edit_main_tr2 = document.createElement('tr');
|
8980 |
var edit_main_tr3 = document.createElement('tr');
|
8981 |
+
edit_main_tr3.style.cssText = "display:none";
|
8982 |
var edit_main_tr4 = document.createElement('tr');
|
8983 |
var edit_main_tr5 = document.createElement('tr');
|
8984 |
var edit_main_tr6 = document.createElement('tr');
|
8986 |
var edit_main_tr8 = document.createElement('tr');
|
8987 |
var edit_main_tr9 = document.createElement('tr');
|
8988 |
var edit_main_tr10 = document.createElement('tr');
|
8989 |
+
var edit_main_tr11 = document.createElement('tr');
|
8990 |
var edit_main_td1 = document.createElement('td');
|
8991 |
var edit_main_td1_1 = document.createElement('td');
|
8992 |
var edit_main_td2 = document.createElement('td');
|
9007 |
var edit_main_td9_1 = document.createElement('td');
|
9008 |
var edit_main_td10 = document.createElement('td');
|
9009 |
var edit_main_td10_1 = document.createElement('td');
|
9010 |
+
var edit_main_td11 = document.createElement('td');
|
9011 |
+
var edit_main_td11_1 = document.createElement('td');
|
9012 |
|
9013 |
var el_label_label = document.createElement('label');
|
9014 |
+
el_label_label.setAttribute("for", "edit_for_label");
|
9015 |
+
el_label_label.innerHTML = "Field label";
|
9016 |
|
9017 |
var el_label_textarea = document.createElement('textarea');
|
9018 |
+
el_label_textarea.setAttribute("id", "edit_for_label");
|
9019 |
+
el_label_textarea.setAttribute("rows", "4");
|
9020 |
+
el_label_textarea.style.cssText = "width:200px;";
|
9021 |
+
el_label_textarea.setAttribute("onKeyUp", "change_label('"+i+"_element_labelform_id_temp', this.value)");
|
9022 |
+
el_label_textarea.innerHTML = w_field_label;
|
9023 |
|
9024 |
var el_label_size_label = document.createElement('label');
|
9025 |
el_label_size_label.setAttribute("for", "edit_for_label_size");
|
9033 |
el_label_size.setAttribute("onKeyUp", "change_w_style('"+i+"_label_sectionform_id_temp', this.value)");
|
9034 |
|
9035 |
var el_label_position_label = document.createElement('label');
|
9036 |
+
el_label_position_label.innerHTML = "Field label position";
|
9037 |
|
9038 |
var el_label_position1 = document.createElement('input');
|
9039 |
+
el_label_position1.setAttribute("id", "edit_for_label_position_top");
|
9040 |
+
el_label_position1.setAttribute("type", "radio");
|
9041 |
+
el_label_position1.setAttribute("name", "edit_for_label_position");
|
9042 |
+
el_label_position1.setAttribute("onchange", "label_left("+i+")");
|
9043 |
Left = document.createTextNode("Left");
|
9044 |
|
9045 |
var el_label_position2 = document.createElement('input');
|
9046 |
+
el_label_position2.setAttribute("id", "edit_for_label_position_left");
|
9047 |
+
el_label_position2.setAttribute("type", "radio");
|
9048 |
+
el_label_position2.setAttribute("name", "edit_for_label_position");
|
9049 |
+
el_label_position2.setAttribute("onchange", "label_top("+i+")");
|
9050 |
Top = document.createTextNode("Top");
|
9051 |
|
9052 |
if(w_field_label_pos=="top")
|
9053 |
+
el_label_position2.setAttribute("checked", "checked");
|
9054 |
else
|
9055 |
+
el_label_position1.setAttribute("checked", "checked");
|
9056 |
|
9057 |
var gic = document.createTextNode("-");
|
9058 |
|
9061 |
el_first_value_label.innerHTML = "Value if empty ";
|
9062 |
|
9063 |
var el_first_value_first = document.createElement('input');
|
9064 |
+
el_first_value_first.setAttribute("id", "el_first_value_first");
|
9065 |
+
el_first_value_first.setAttribute("type", "text");
|
9066 |
+
el_first_value_first.setAttribute("value", w_title[0]);
|
9067 |
+
el_first_value_first.style.cssText = "width:80px; margin-left:4px; margin-right:4px";
|
9068 |
+
el_first_value_first.setAttribute("onKeyUp", "change_input_value(this.value,'"+i+"_element_firstform_id_temp')");
|
9069 |
|
9070 |
var el_first_value_last = document.createElement('input');
|
9071 |
+
el_first_value_last.setAttribute("id", "el_first_value_last");
|
9072 |
+
el_first_value_last.setAttribute("type", "text");
|
9073 |
+
el_first_value_last.setAttribute("value", w_title[1]);
|
9074 |
+
el_first_value_last.style.cssText = "width:80px; margin-left:4px; margin-right:4px";
|
9075 |
+
el_first_value_last.setAttribute("onKeyUp", "change_input_value(this.value,'"+i+"_element_lastform_id_temp')");
|
9076 |
|
9077 |
var el_size_label = document.createElement('label');
|
9078 |
+
el_size_label.setAttribute("for", "edit_for_input_size");
|
9079 |
+
el_size_label.innerHTML = "Field size(px) ";
|
9080 |
var el_size = document.createElement('input');
|
9081 |
+
el_size.setAttribute("id", "edit_for_input_size");
|
9082 |
+
el_size.setAttribute("type", "text");
|
9083 |
+
el_size.setAttribute("value", w_size);
|
9084 |
+
el_size.setAttribute("onKeyPress", "return check_isnum(event)");
|
9085 |
+
el_size.setAttribute("onKeyUp", "change_w_style('"+i+"_element_firstform_id_temp', this.value); change_w_style('"+i+"_element_lastform_id_temp', this.value); change_w_style('"+i+"_element_middleform_id_temp', this.value)");
|
|
|
|
|
|
|
9086 |
|
9087 |
var el_format_label = document.createElement('label');
|
9088 |
+
el_format_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
9089 |
el_format_label.innerHTML = "Name Format";
|
9090 |
|
9091 |
var el_format_normal = document.createElement('input');
|
9092 |
+
el_format_normal.setAttribute("id", "el_format_normal");
|
9093 |
+
el_format_normal.setAttribute("type", "radio");
|
9094 |
+
el_format_normal.setAttribute("value", "normal");
|
9095 |
el_format_normal.setAttribute("name", "edit_for_name_format");
|
9096 |
+
el_format_normal.setAttribute("onchange", "format_normal("+i+")");
|
9097 |
el_format_normal.setAttribute("checked", "checked");
|
9098 |
Normal = document.createTextNode("Normal");
|
9099 |
|
9100 |
var el_format_extended = document.createElement('input');
|
9101 |
+
el_format_extended.setAttribute("id", "el_format_extended");
|
9102 |
+
el_format_extended.setAttribute("type", "radio");
|
9103 |
+
el_format_extended.setAttribute("value", "extended");
|
9104 |
el_format_extended.setAttribute("name", "edit_for_name_format");
|
9105 |
+
el_format_extended.setAttribute("onchange", "format_extended("+i+",'','','','')");
|
9106 |
Extended = document.createTextNode("Extended");
|
9107 |
|
9108 |
if(w_name_format=="normal")
|
9109 |
+
el_format_normal.setAttribute("checked", "checked");
|
|
|
9110 |
else
|
9111 |
+
el_format_extended.setAttribute("checked", "checked");
|
9112 |
+
|
9113 |
+
////////////////////////////////////////////////////////////////////////////////
|
9114 |
+
/////////////////////////////////////////////////////////////////////////////////////////
|
9115 |
+
|
9116 |
+
var el_enable_field_label = document.createElement('label');
|
9117 |
+
el_enable_field_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
9118 |
+
el_enable_field_label.innerHTML = "Enable Field(s)";
|
9119 |
+
|
9120 |
+
var el_enable_title = document.createElement('input');
|
9121 |
+
el_enable_title.setAttribute("id", "el_title");
|
9122 |
+
el_enable_title.setAttribute("type", "checkbox");
|
9123 |
+
el_enable_title.setAttribute("value", "no");
|
9124 |
+
el_enable_title.setAttribute("onclick", "enable_name_fields('"+i+"','title')");
|
9125 |
+
if(w_name_fields[0]=="yes")
|
9126 |
+
el_enable_title.setAttribute("checked", "checked");
|
9127 |
+
|
9128 |
+
var el_enable_middle = document.createElement('input');
|
9129 |
+
el_enable_middle.setAttribute("id", "el_middle");
|
9130 |
+
el_enable_middle.setAttribute("type", "checkbox");
|
9131 |
+
el_enable_middle.setAttribute("value", "no");
|
9132 |
+
el_enable_middle.setAttribute("onclick", "enable_name_fields('"+i+"','middle')");
|
9133 |
+
if(w_name_fields[1]=="yes")
|
9134 |
+
el_enable_middle.setAttribute("checked", "checked");
|
9135 |
+
|
9136 |
+
var el_title = document.createTextNode(w_mini_labels[0]);
|
9137 |
+
var el_first = document.createTextNode(w_mini_labels[1]);
|
9138 |
+
var el_last = document.createTextNode(w_mini_labels[2]);
|
9139 |
+
var el_middle = document.createTextNode(w_mini_labels[3]);
|
9140 |
|
9141 |
+
var el_title_label = document.createElement('label');
|
9142 |
+
el_title_label.setAttribute("id", "el_title_label");
|
9143 |
+
el_title_label.setAttribute("for", "el_title");
|
9144 |
+
|
9145 |
+
var el_first_label = document.createElement('label');
|
9146 |
+
el_first_label.setAttribute("id", "el_first_label");
|
9147 |
+
el_first_label.setAttribute("for", "el_first");
|
9148 |
+
|
9149 |
+
var el_last_label = document.createElement('label');
|
9150 |
+
el_last_label.setAttribute("id", "el_last_label");
|
9151 |
+
el_last_label.setAttribute("for", "el_last");
|
9152 |
+
|
9153 |
+
var el_middle_label = document.createElement('label');
|
9154 |
+
el_middle_label.setAttribute("id", "el_middle_label");
|
9155 |
+
el_middle_label.setAttribute("for", "el_middle");
|
9156 |
+
////////////////////////////////////////////////////////////////////////
|
9157 |
+
//////////////////////////////////////////////////////////////////
|
9158 |
var el_required_label = document.createElement('label');
|
9159 |
+
el_required_label.setAttribute("for", "el_required");
|
9160 |
el_required_label.innerHTML = "Required";
|
9161 |
|
9162 |
var el_required = document.createElement('input');
|
9163 |
+
el_required.setAttribute("id", "el_required");
|
9164 |
+
el_required.setAttribute("type", "checkbox");
|
9165 |
+
el_required.setAttribute("onclick", "set_required('"+i+"_required')");
|
9166 |
+
if(w_required=="yes")
|
9167 |
+
el_required.setAttribute("checked", "checked");
|
|
|
9168 |
|
9169 |
var el_unique_label = document.createElement('label');
|
9170 |
el_unique_label.setAttribute("for", "el_unique");
|
9171 |
el_unique_label.innerHTML = "Allow only unique values";
|
9172 |
|
9173 |
var el_unique = document.createElement('input');
|
9174 |
+
el_unique.setAttribute("id", "el_unique");
|
9175 |
+
el_unique.setAttribute("type", "checkbox");
|
9176 |
+
el_unique.setAttribute("onclick", "set_unique('"+i+"_uniqueform_id_temp')");
|
9177 |
+
if(w_unique=="yes")
|
9178 |
+
el_unique.setAttribute("checked", "checked");
|
|
|
9179 |
|
9180 |
var el_style_label = document.createElement('label');
|
9181 |
+
el_style_label.setAttribute("for", "el_style_textarea");
|
9182 |
+
el_style_label.innerHTML = "Class name";
|
9183 |
|
9184 |
var el_style_textarea = document.createElement('input');
|
9185 |
+
el_style_textarea.setAttribute("id", "el_style_textarea");
|
9186 |
+
el_style_textarea.setAttribute("type", "text");
|
9187 |
+
el_style_textarea.setAttribute("value", w_class);
|
9188 |
+
el_style_textarea.style.cssText = "width:200px;";
|
9189 |
+
el_style_textarea.setAttribute("onChange", "change_class(this.value,'"+i+"')");
|
9190 |
|
9191 |
var el_attr_label = document.createElement('label');
|
9192 |
+
el_attr_label.innerHTML = "Additional Attributes";
|
|
|
9193 |
var el_attr_add = document.createElement('img');
|
9194 |
+
el_attr_add.setAttribute("src", plugin_url + '/images/add.png');
|
9195 |
+
el_attr_add.style.cssText = 'cursor:pointer; margin-left:68px';
|
9196 |
+
el_attr_add.setAttribute("title", 'add');
|
9197 |
+
el_attr_add.setAttribute("onClick", "add_attr("+i+", 'type_name')");
|
|
|
9198 |
var el_attr_table = document.createElement('table');
|
9199 |
+
el_attr_table.setAttribute("id", 'attributes');
|
9200 |
+
el_attr_table.setAttribute("border", '0');
|
9201 |
+
el_attr_table.style.cssText = 'margin-left:0px';
|
9202 |
var el_attr_tr_label = document.createElement('tr');
|
9203 |
+
el_attr_tr_label.setAttribute("idi", '0');
|
9204 |
var el_attr_td_name_label = document.createElement('th');
|
9205 |
+
el_attr_td_name_label.style.cssText = 'width:100px';
|
9206 |
var el_attr_td_value_label = document.createElement('th');
|
9207 |
+
el_attr_td_value_label.style.cssText = 'width:100px';
|
9208 |
var el_attr_td_X_label = document.createElement('th');
|
9209 |
+
el_attr_td_X_label.style.cssText = 'width:10px';
|
9210 |
var el_attr_name_label = document.createElement('label');
|
9211 |
+
el_attr_name_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 11px";
|
9212 |
+
el_attr_name_label.innerHTML = "Name";
|
9213 |
|
9214 |
var el_attr_value_label = document.createElement('label');
|
9215 |
+
el_attr_value_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 11px";
|
9216 |
+
el_attr_value_label.innerHTML = "Value";
|
9217 |
|
9218 |
el_attr_table.appendChild(el_attr_tr_label);
|
9219 |
el_attr_tr_label.appendChild(el_attr_td_name_label);
|
9235 |
|
9236 |
var el_attr_td_X = document.createElement('td');
|
9237 |
var el_attr_name = document.createElement('input');
|
|
|
9238 |
el_attr_name.setAttribute("type", "text");
|
|
|
9239 |
el_attr_name.style.cssText = "width:100px";
|
9240 |
el_attr_name.setAttribute("value", w_attr_name[j-1]);
|
9241 |
el_attr_name.setAttribute("id", "attr_name"+j);
|
9242 |
el_attr_name.setAttribute("onChange", "change_attribute_name("+i+", this, 'type_name')");
|
9243 |
|
9244 |
var el_attr_value = document.createElement('input');
|
|
|
9245 |
el_attr_value.setAttribute("type", "text");
|
|
|
9246 |
el_attr_value.style.cssText = "width:100px";
|
9247 |
el_attr_value.setAttribute("value", w_attr_value[j-1]);
|
9248 |
el_attr_value.setAttribute("id", "attr_value"+j);
|
9253 |
el_attr_remove.setAttribute("src", plugin_url + '/images/delete.png');
|
9254 |
el_attr_remove.style.cssText = 'cursor:pointer; vertical-align:middle; margin:3px';
|
9255 |
|
9256 |
+
el_attr_remove.setAttribute("onClick", "remove_attr("+j+", "+i+", 'type_name')");
|
9257 |
el_attr_table.appendChild(el_attr_tr);
|
9258 |
el_attr_tr.appendChild(el_attr_td_name);
|
9259 |
el_attr_tr.appendChild(el_attr_td_value);
|
9261 |
el_attr_td_name.appendChild(el_attr_name);
|
9262 |
el_attr_td_value.appendChild(el_attr_value);
|
9263 |
el_attr_td_X.appendChild(el_attr_remove);
|
|
|
9264 |
}
|
9265 |
|
|
|
9266 |
var t = document.getElementById('edit_table');
|
|
|
9267 |
var br = document.createElement('br');
|
9268 |
var br1 = document.createElement('br');
|
9269 |
var br2 = document.createElement('br');
|
9271 |
var br4 = document.createElement('br');
|
9272 |
var br5 = document.createElement('br');
|
9273 |
var br6 = document.createElement('br');
|
9274 |
+
var br7 = document.createElement('br');
|
9275 |
+
var br8 = document.createElement('br');
|
9276 |
|
9277 |
edit_main_td1.appendChild(el_label_label);
|
9278 |
edit_main_td1_1.appendChild(el_label_textarea);
|
9283 |
edit_main_td2.appendChild(el_label_position_label);
|
9284 |
edit_main_td2_1.appendChild(el_label_position1);
|
9285 |
edit_main_td2_1.appendChild(Left);
|
9286 |
+
edit_main_td2_1.appendChild(br);
|
9287 |
edit_main_td2_1.appendChild(el_label_position2);
|
9288 |
edit_main_td2_1.appendChild(Top);
|
9289 |
|
9292 |
edit_main_td9_1.appendChild(gic);
|
9293 |
edit_main_td9_1.appendChild(el_first_value_last);
|
9294 |
|
|
|
|
|
9295 |
edit_main_td7.appendChild(el_size_label);
|
9296 |
edit_main_td7_1.appendChild(el_size);
|
9297 |
|
9298 |
edit_main_td3.appendChild(el_format_label);
|
|
|
9299 |
edit_main_td3_1.appendChild(el_format_normal);
|
9300 |
edit_main_td3_1.appendChild(Normal);
|
9301 |
+
edit_main_td3_1.appendChild(br1);
|
9302 |
edit_main_td3_1.appendChild(el_format_extended);
|
9303 |
edit_main_td3_1.appendChild(Extended);
|
9304 |
|
9305 |
+
///////////////////////////////////////
|
9306 |
+
/////////////////////////////////////////
|
9307 |
+
el_title_label.appendChild(el_title);
|
9308 |
+
el_first_label.appendChild(el_first);
|
9309 |
+
el_last_label.appendChild(el_last);
|
9310 |
+
el_middle_label.appendChild(el_middle);
|
9311 |
+
|
9312 |
+
edit_main_td11.appendChild(el_enable_field_label);
|
9313 |
+
edit_main_td11_1.appendChild(el_enable_title);
|
9314 |
+
edit_main_td11_1.appendChild(el_title_label);
|
9315 |
+
edit_main_td11_1.appendChild(br3);
|
9316 |
+
edit_main_td11_1.appendChild(el_enable_middle);
|
9317 |
+
edit_main_td11_1.appendChild(el_middle_label);
|
9318 |
+
edit_main_td11_1.appendChild(br6);
|
9319 |
+
|
9320 |
+
///////////////////////////////////////////////
|
9321 |
+
////////////////////////////////////////////////
|
9322 |
edit_main_td4.appendChild(el_style_label);
|
9323 |
edit_main_td4_1.appendChild(el_style_textarea);
|
9324 |
|
9330 |
|
9331 |
edit_main_td6.appendChild(el_attr_label);
|
9332 |
edit_main_td6.appendChild(el_attr_add);
|
9333 |
+
edit_main_td6.appendChild(br2);
|
9334 |
edit_main_td6.appendChild(el_attr_table);
|
9335 |
edit_main_td6.setAttribute("colspan", "2");
|
9336 |
|
9344 |
edit_main_tr7.appendChild(edit_main_td7_1);
|
9345 |
edit_main_tr3.appendChild(edit_main_td3);
|
9346 |
edit_main_tr3.appendChild(edit_main_td3_1);
|
9347 |
+
edit_main_tr11.appendChild(edit_main_td11);
|
9348 |
+
edit_main_tr11.appendChild(edit_main_td11_1);
|
9349 |
edit_main_tr4.appendChild(edit_main_td4);
|
9350 |
edit_main_tr4.appendChild(edit_main_td4_1);
|
9351 |
edit_main_tr5.appendChild(edit_main_td5);
|
9363 |
edit_main_table.appendChild(edit_main_tr9);
|
9364 |
edit_main_table.appendChild(edit_main_tr7);
|
9365 |
edit_main_table.appendChild(edit_main_tr3);
|
9366 |
+
edit_main_table.appendChild(edit_main_tr11);
|
9367 |
edit_main_table.appendChild(edit_main_tr4);
|
9368 |
edit_main_table.appendChild(edit_main_tr5);
|
9369 |
edit_main_table.appendChild(edit_main_tr8);
|
9372 |
|
9373 |
t.appendChild(edit_div);
|
9374 |
add_id_and_name(i, 'type_name');
|
|
|
9375 |
//show table
|
9376 |
|
9377 |
var adding_type = document.createElement("input");
|
9378 |
+
adding_type.setAttribute("type", "hidden");
|
9379 |
+
adding_type.setAttribute("value", "type_name");
|
9380 |
+
adding_type.setAttribute("name", i+"_typeform_id_temp");
|
9381 |
+
adding_type.setAttribute("id", i+"_typeform_id_temp");
|
9382 |
var adding_required= document.createElement("input");
|
9383 |
+
adding_required.setAttribute("type", "hidden");
|
9384 |
+
adding_required.setAttribute("value", w_required);
|
9385 |
+
adding_required.setAttribute("name", i+"_requiredform_id_temp");
|
9386 |
+
adding_required.setAttribute("id", i+"_requiredform_id_temp");
|
9387 |
+
|
9388 |
+
var adding_fields = document.createElement("input");
|
9389 |
+
adding_fields.setAttribute("type", "hidden");
|
9390 |
+
adding_fields.setAttribute("name", i+"_enable_fieldsform_id_temp");
|
9391 |
+
adding_fields.setAttribute("id", i+"_enable_fieldsform_id_temp");
|
9392 |
+
adding_fields.setAttribute("title", w_name_fields[0]);
|
9393 |
+
adding_fields.setAttribute("first", 'yes');
|
9394 |
+
adding_fields.setAttribute("last", 'yes');
|
9395 |
+
adding_fields.setAttribute("middle", w_name_fields[1]);
|
9396 |
+
|
9397 |
var adding_unique= document.createElement("input");
|
9398 |
+
adding_unique.setAttribute("type", "hidden");
|
9399 |
+
adding_unique.setAttribute("value", w_unique);
|
9400 |
+
adding_unique.setAttribute("name", i+"_uniqueform_id_temp");
|
9401 |
+
adding_unique.setAttribute("id", i+"_uniqueform_id_temp");
|
9402 |
+
|
9403 |
+
edit_labels = document.createTextNode("The labels of the fields are editable. Please, click the label to edit.");
|
|
|
|
|
|
|
|
|
|
|
9404 |
|
9405 |
+
var div = document.createElement('div');
|
9406 |
+
div.setAttribute("id", "main_div");
|
9407 |
+
var div_for_editable_labels = document.createElement('div');
|
9408 |
+
div_for_editable_labels.setAttribute("style", "margin-left:4px; color:red;");
|
9409 |
div_for_editable_labels.appendChild(edit_labels);
|
9410 |
|
9411 |
+
var div_field = document.createElement('div');
|
9412 |
+
div_field.setAttribute("id", i+"_elemet_tableform_id_temp");
|
9413 |
|
9414 |
+
var div_label = document.createElement('div');
|
9415 |
+
div_label.setAttribute("align", 'left');
|
9416 |
+
div_label.style.display="table-cell";
|
9417 |
+
div_label.style.width=w_field_label_size +"px";
|
9418 |
+
div_label.setAttribute("id", i+"_label_sectionform_id_temp");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9419 |
|
9420 |
+
var div_element = document.createElement('div');
|
9421 |
+
div_element.setAttribute("align", 'left');
|
9422 |
+
div_element.style.display="table-cell";
|
9423 |
+
div_element.setAttribute("id", i+"_element_sectionform_id_temp");
|
9424 |
+
|
9425 |
+
var table_name = document.createElement('div');
|
9426 |
+
table_name.style.display="table";
|
9427 |
+
table_name.setAttribute("id", i+"_table_name");
|
9428 |
+
table_name.setAttribute("cellpadding", '0');
|
9429 |
+
table_name.setAttribute("cellspacing", '0');
|
9430 |
+
|
9431 |
+
var tr_name1 = document.createElement('div');
|
9432 |
+
tr_name1.style.display="table-row";
|
9433 |
+
tr_name1.setAttribute("id", i+"_tr_name1");
|
9434 |
+
|
9435 |
+
var tr_name2 = document.createElement('div');
|
9436 |
+
tr_name2.style.display="table-row";
|
9437 |
+
tr_name2.setAttribute("id", i+"_tr_name2");
|
9438 |
+
|
9439 |
+
var td_name_input1 = document.createElement('div');
|
9440 |
+
td_name_input1.style.display="table-cell";
|
9441 |
+
td_name_input1.setAttribute("id", i+"_td_name_input_first");
|
9442 |
+
|
9443 |
+
var td_name_input2 = document.createElement('div');
|
9444 |
+
td_name_input2.style.display="table-cell";
|
9445 |
+
td_name_input2.setAttribute("id", i+"_td_name_input_last");
|
9446 |
+
|
9447 |
+
var td_name_label1 = document.createElement('div');
|
9448 |
+
td_name_label1.style.display="table-cell";
|
9449 |
+
td_name_label1.setAttribute("id", i+"_td_name_label_first");
|
9450 |
+
td_name_label1.setAttribute("align", "left");
|
9451 |
+
|
9452 |
+
var td_name_label2 = document.createElement('div');
|
9453 |
+
td_name_label2.style.display="table-cell";
|
9454 |
+
td_name_label2.setAttribute("id", i+"_td_name_label_last");
|
9455 |
+
td_name_label2.setAttribute("align", "left");
|
9456 |
+
|
9457 |
+
var label = document.createElement('span');
|
9458 |
label.setAttribute("id", i+"_element_labelform_id_temp");
|
9459 |
label.innerHTML = w_field_label;
|
9460 |
label.setAttribute("class", "label");
|
9461 |
label.style.verticalAlign="top";
|
9462 |
+
|
9463 |
+
var required = document.createElement('span');
|
9464 |
+
required.setAttribute("id", i+"_required_elementform_id_temp");
|
9465 |
+
required.innerHTML = "";
|
9466 |
+
required.setAttribute("class", "required");
|
9467 |
+
required.style.verticalAlign="top";
|
9468 |
+
if(w_required=="yes")
|
9469 |
+
required.innerHTML = " *";
|
9470 |
+
|
9471 |
var first = document.createElement('input');
|
9472 |
+
first.setAttribute("type", 'text');
|
9473 |
if(w_title[0]==w_first_val[0])
|
9474 |
first.setAttribute("class", "input_deactive");
|
9475 |
else
|
9476 |
first.setAttribute("class", "input_active");
|
|
|
9477 |
first.style.cssText = "margin-right: 10px; width:"+w_size+"px";
|
9478 |
first.setAttribute("id", i+"_element_firstform_id_temp");
|
9479 |
first.setAttribute("name", i+"_element_firstform_id_temp");
|
9490 |
|
9491 |
var last = document.createElement('input');
|
9492 |
last.setAttribute("type", 'text');
|
9493 |
+
if(w_title[1]==w_first_val[1])
|
|
|
9494 |
last.setAttribute("class", "input_deactive");
|
9495 |
else
|
9496 |
last.setAttribute("class", "input_active");
|
|
|
9497 |
last.style.cssText = "margin-right: 10px; width:"+w_size+"px";
|
9498 |
last.setAttribute("id", i+"_element_lastform_id_temp");
|
9499 |
+
last.setAttribute("name", i+"_element_lastform_id_temp");
|
9500 |
last.setAttribute("value", w_first_val[1]);
|
9501 |
last.setAttribute("title", w_title[1]);
|
9502 |
last.setAttribute("onFocus", 'delete_value("'+i+'_element_lastform_id_temp")');
|
9503 |
last.setAttribute("onBlur", 'return_value("'+i+'_element_lastform_id_temp")');
|
9504 |
last.setAttribute("onChange", "change_value('"+i+"_element_lastform_id_temp')");
|
9505 |
|
|
|
9506 |
var last_label = document.createElement('label');
|
9507 |
last_label.setAttribute("class", "mini_label");
|
9508 |
last_label.setAttribute("id", i+"_mini_label_last");
|
9509 |
last_label.innerHTML= w_mini_labels[2];
|
9510 |
|
9511 |
+
var main_td = document.getElementById('show_table');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9512 |
|
9513 |
+
div_label.appendChild(label);
|
9514 |
+
div_label.appendChild(required );
|
9515 |
+
|
9516 |
+
td_name_input1.appendChild(first);
|
9517 |
+
td_name_input2.appendChild(last);
|
9518 |
+
tr_name1.appendChild(td_name_input1);
|
9519 |
+
tr_name1.appendChild(td_name_input2);
|
9520 |
+
|
9521 |
+
td_name_label1.appendChild(first_label);
|
9522 |
+
td_name_label2.appendChild(last_label);
|
9523 |
+
tr_name2.appendChild(td_name_label1);
|
9524 |
+
tr_name2.appendChild(td_name_label2);
|
9525 |
+
table_name.appendChild(tr_name1);
|
9526 |
+
table_name.appendChild(tr_name2);
|
9527 |
+
|
9528 |
+
|
9529 |
+
div_element.appendChild(adding_type);
|
9530 |
+
div_element.appendChild(adding_required);
|
9531 |
+
div_element.appendChild(adding_unique);
|
9532 |
+
div_element.appendChild(adding_fields);
|
9533 |
+
div_element.appendChild(table_name);
|
9534 |
+
div_field.appendChild(div_label);
|
9535 |
+
div_field.appendChild(div_element);
|
9536 |
+
|
9537 |
+
div.appendChild(div_field);
|
9538 |
+
div.appendChild(br8);
|
9539 |
+
div.appendChild(div_for_editable_labels);
|
9540 |
+
main_td.appendChild(div);
|
9541 |
|
9542 |
if(w_field_label_pos=="top")
|
9543 |
+
label_top(i);
|
9544 |
|
9545 |
+
// if(w_name_format=="extended")
|
9546 |
+
// format_extended(i,w_first_val[2],w_first_val[3],w_title[2],w_title[3]);
|
9547 |
+
|
9548 |
+
change_class(w_class, i);
|
9549 |
+
if(w_name_fields[0] == 'yes')
|
9550 |
+
enable_name_fields(i, 'title');
|
9551 |
+
|
9552 |
+
if(w_name_fields[1] == 'yes')
|
9553 |
+
enable_name_fields(i, 'middle');
|
9554 |
+
|
9555 |
+
jQuery(document).ready(function() {
|
9556 |
+
jQuery("label#"+i+"_mini_label_first").click(function() {
|
9557 |
+
if (jQuery(this).children('input').length == 0) {
|
9558 |
+
var first = "<input type='text' class='first' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
9559 |
jQuery(this).html(first);
|
9560 |
jQuery("input.first").focus();
|
9561 |
jQuery("input.first").blur(function() {
|
9562 |
+
var value = jQuery(this).val();
|
9563 |
+
jQuery("#"+i+"_mini_label_first").text(value);
|
9564 |
+
document.getElementById('el_first_label').innerHTML = value;
|
9565 |
+
});
|
9566 |
+
}
|
9567 |
+
});
|
|
|
|
|
9568 |
|
9569 |
+
jQuery("label#"+i+"_mini_label_last").click(function() {
|
9570 |
+
if (jQuery(this).children('input').length == 0) {
|
9571 |
+
var last = "<input type='text' class='last' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
9572 |
+
jQuery(this).html(last);
|
9573 |
+
jQuery("input.last").focus();
|
9574 |
+
jQuery("input.last").blur(function() {
|
9575 |
+
var value = jQuery(this).val();
|
9576 |
+
jQuery("#"+i+"_mini_label_last").text(value);
|
9577 |
+
document.getElementById('el_last_label').innerHTML = value;
|
9578 |
+
});
|
9579 |
+
}
|
9580 |
+
});
|
9581 |
});
|
9582 |
|
9583 |
+
refresh_attr(i, 'type_name');
|
9584 |
+
refresh_id_name(i, 'type_name');
|
9585 |
}
|
9586 |
|
9587 |
function type_address(i, w_field_label, w_field_label_size, w_field_label_pos, w_size, w_mini_labels, w_disabled_fields, w_required, w_class, w_attr_name, w_attr_value) {
|
26358 |
type_wdeditor(new_id,'Editor:', '100', 'left', '380', '200', '', 'no', '',w_attr_name, w_attr_value)
|
26359 |
}
|
26360 |
|
|
|
|
|
26361 |
function go_to_type_name(new_id)
|
26362 |
{
|
26363 |
+
w_attr_name = [];
|
26364 |
+
w_attr_value = [];
|
26365 |
+
w_first_val = ['', '', '', ''];
|
26366 |
+
w_title = ['', '', '', ''];
|
26367 |
+
w_mini_labels = ['Title','First','Last','Middle'];
|
26368 |
+
w_name_fields = ['no', 'no'];
|
26369 |
+
type_name(new_id,'Name:', '100', 'left', w_first_val, w_title, w_mini_labels, '100', 'normal', 'no', 'no', '',w_attr_name, w_attr_value, w_name_fields)
|
26370 |
}
|
26371 |
|
26372 |
function go_to_type_address(new_id)
|
27529 |
is7++;
|
27530 |
}
|
27531 |
}
|
27532 |
+
if (is7 >= 9) {
|
27533 |
break;
|
27534 |
}
|
27535 |
}
|
27536 |
+
if (is7 >= 9) {
|
27537 |
+
alert("The free version is limited up to 9 fields to add. If you need this functionality, you need to buy the commercial version.");
|
27538 |
return true;
|
27539 |
}
|
27540 |
return false;
|
28910 |
}
|
28911 |
case 'type_name':
|
28912 |
{
|
28913 |
+
if(document.getElementById(id+"_enable_fieldsform_id_temp")) {
|
|
|
|
|
28914 |
w_name_format="normal";
|
28915 |
+
|
28916 |
+
w_first_val=[document.getElementById(id+"_element_firstform_id_temp").value, document.getElementById(id+"_element_lastform_id_temp").value];
|
28917 |
+
w_title=[document.getElementById(id+"_element_firstform_id_temp").title, document.getElementById(id+"_element_lastform_id_temp").title];
|
28918 |
+
|
28919 |
+
var title_middle = ['title', 'middle'];
|
28920 |
+
for(var l=0; l<2; l++)
|
28921 |
+
{
|
28922 |
+
w_first_val.push(document.getElementById(id+'_element_'+title_middle[l]+'form_id_temp') ? document.getElementById(id+'_element_'+title_middle[l]+'form_id_temp').value : '');
|
28923 |
+
w_title.push(document.getElementById(id+'_element_'+title_middle[l]+'form_id_temp') ? document.getElementById(id+'_element_'+title_middle[l]+'form_id_temp').title : '');
|
28924 |
+
}
|
28925 |
+
|
28926 |
}
|
28927 |
else
|
28928 |
{
|
28929 |
+
if(document.getElementById(id+'_element_middleform_id_temp'))
|
28930 |
+
w_name_format="extended";
|
28931 |
+
else
|
28932 |
+
w_name_format="normal";
|
28933 |
|
28934 |
+
if(w_name_format=="normal") {
|
28935 |
+
w_first_val=[document.getElementById(id+"_element_firstform_id_temp").value, document.getElementById(id+"_element_lastform_id_temp").value];
|
28936 |
+
w_title=[document.getElementById(id+"_element_firstform_id_temp").title, document.getElementById(id+"_element_lastform_id_temp").title];
|
28937 |
+
}
|
28938 |
+
else {
|
28939 |
+
w_first_val=[document.getElementById(id+"_element_firstform_id_temp").value, document.getElementById(id+"_element_lastform_id_temp").value, document.getElementById(id+"_element_titleform_id_temp").value, document.getElementById(id+"_element_middleform_id_temp").value];
|
28940 |
+
w_title=[document.getElementById(id+"_element_firstform_id_temp").title, document.getElementById(id+"_element_lastform_id_temp").title, document.getElementById(id+"_element_titleform_id_temp").title,document.getElementById(id+"_element_middleform_id_temp").title];
|
28941 |
+
}
|
28942 |
}
|
28943 |
+
|
28944 |
if(document.getElementById(id+"_mini_label_title"))
|
28945 |
+
w_mini_title = document.getElementById(id+"_mini_label_title").innerHTML;
|
28946 |
else
|
28947 |
+
w_mini_title = "Title";
|
28948 |
+
|
|
|
|
|
28949 |
if(document.getElementById(id+"_mini_label_middle"))
|
28950 |
+
w_mini_middle = document.getElementById(id+"_mini_label_middle").innerHTML;
|
28951 |
else
|
28952 |
+
w_mini_middle = "Middle";
|
|
|
|
|
|
|
28953 |
|
28954 |
+
w_mini_labels = [w_mini_title, document.getElementById(id+"_mini_label_first").innerHTML,document.getElementById(id+"_mini_label_last").innerHTML, w_mini_middle];
|
28955 |
+
w_name_title = document.getElementById(id+'_enable_fieldsform_id_temp') ? document.getElementById(id+'_enable_fieldsform_id_temp').getAttribute('title') : (w_name_format=="normal" ? 'no' : 'yes');
|
28956 |
+
w_name_middle = document.getElementById(id+'_enable_fieldsform_id_temp') ? document.getElementById(id+'_enable_fieldsform_id_temp').getAttribute('middle') : (w_name_format=="normal" ? 'no' : 'yes');
|
28957 |
+
w_name_fields = [w_name_title, w_name_middle];
|
28958 |
+
|
28959 |
s=document.getElementById(id+"_element_firstform_id_temp").style.width;
|
28960 |
w_size=s.substring(0,s.length-2);
|
28961 |
atrs=return_attributes(id+'_element_firstform_id_temp');
|
28962 |
w_attr_name=atrs[0];
|
28963 |
w_attr_value=atrs[1];
|
28964 |
+
|
28965 |
+
|
28966 |
+
type_name(id, w_field_label, w_field_label_size, w_field_label_pos,w_first_val, w_title, w_mini_labels, w_size, w_name_format, w_required, w_unique, w_class, w_attr_name, w_attr_value, w_name_fields);break;
|
28967 |
}
|
28968 |
|
28969 |
case 'type_paypal_price':
|
30037 |
}
|
30038 |
case 'type_name':
|
30039 |
{
|
30040 |
+
if(document.getElementById(id+"_enable_fieldsform_id_temp")) {
|
|
|
|
|
30041 |
w_name_format="normal";
|
30042 |
+
|
30043 |
+
w_first_val=[document.getElementById(id+"_element_firstform_id_temp").value, document.getElementById(id+"_element_lastform_id_temp").value];
|
30044 |
+
w_title=[document.getElementById(id+"_element_firstform_id_temp").title, document.getElementById(id+"_element_lastform_id_temp").title];
|
30045 |
+
|
30046 |
+
var title_middle = ['title', 'middle'];
|
30047 |
+
for(var l=0; l<2; l++)
|
30048 |
+
{
|
30049 |
+
w_first_val.push(document.getElementById(id+'_element_'+title_middle[l]+'form_id_temp') ? document.getElementById(id+'_element_'+title_middle[l]+'form_id_temp').value : '');
|
30050 |
+
w_title.push(document.getElementById(id+'_element_'+title_middle[l]+'form_id_temp') ? document.getElementById(id+'_element_'+title_middle[l]+'form_id_temp').title : '');
|
30051 |
+
}
|
30052 |
+
|
30053 |
}
|
30054 |
else
|
30055 |
{
|
30056 |
+
if(document.getElementById(id+'_element_middleform_id_temp'))
|
30057 |
+
w_name_format="extended";
|
30058 |
+
else
|
30059 |
+
w_name_format="normal";
|
30060 |
|
30061 |
+
if(w_name_format=="normal") {
|
30062 |
+
w_first_val=[document.getElementById(id+"_element_firstform_id_temp").value, document.getElementById(id+"_element_lastform_id_temp").value];
|
30063 |
+
w_title=[document.getElementById(id+"_element_firstform_id_temp").title, document.getElementById(id+"_element_lastform_id_temp").title];
|
30064 |
+
}
|
30065 |
+
else {
|
30066 |
+
w_first_val=[document.getElementById(id+"_element_firstform_id_temp").value, document.getElementById(id+"_element_lastform_id_temp").value, document.getElementById(id+"_element_titleform_id_temp").value, document.getElementById(id+"_element_middleform_id_temp").value];
|
30067 |
+
w_title=[document.getElementById(id+"_element_firstform_id_temp").title, document.getElementById(id+"_element_lastform_id_temp").title, document.getElementById(id+"_element_titleform_id_temp").title,document.getElementById(id+"_element_middleform_id_temp").title];
|
30068 |
+
}
|
30069 |
}
|
30070 |
+
|
30071 |
if(document.getElementById(id+"_mini_label_title"))
|
30072 |
+
w_mini_title = document.getElementById(id+"_mini_label_title").innerHTML;
|
30073 |
else
|
30074 |
+
w_mini_title = "Title";
|
30075 |
+
|
|
|
|
|
30076 |
if(document.getElementById(id+"_mini_label_middle"))
|
30077 |
+
w_mini_middle = document.getElementById(id+"_mini_label_middle").innerHTML;
|
30078 |
else
|
30079 |
+
w_mini_middle = "Middle";
|
|
|
|
|
|
|
30080 |
|
30081 |
+
w_mini_labels = [w_mini_title, document.getElementById(id+"_mini_label_first").innerHTML,document.getElementById(id+"_mini_label_last").innerHTML, w_mini_middle];
|
30082 |
+
w_name_title = document.getElementById(id+'_enable_fieldsform_id_temp') ? document.getElementById(id+'_enable_fieldsform_id_temp').getAttribute('title') : (w_name_format=="normal" ? 'no' : 'yes');
|
30083 |
+
w_name_middle = document.getElementById(id+'_enable_fieldsform_id_temp') ? document.getElementById(id+'_enable_fieldsform_id_temp').getAttribute('middle') : (w_name_format=="normal" ? 'no' : 'yes');
|
30084 |
+
w_name_fields = [w_name_title, w_name_middle];
|
30085 |
+
|
30086 |
s=document.getElementById(id+"_element_firstform_id_temp").style.width;
|
30087 |
w_size=s.substring(0,s.length-2);
|
30088 |
atrs=return_attributes(id+'_element_firstform_id_temp');
|
30089 |
w_attr_name=atrs[0];
|
30090 |
w_attr_value=atrs[1];
|
30091 |
+
|
30092 |
+
type_name(gen, w_field_label, w_field_label_size, w_field_label_pos,w_first_val, w_title, w_mini_labels, w_size, w_name_format, w_required, w_unique, w_class, w_attr_name, w_attr_value, w_name_fields);break;
|
30093 |
}
|
30094 |
|
30095 |
case 'type_paypal_price':
|
31189 |
}
|
31190 |
case 'type_name':
|
31191 |
{
|
31192 |
+
if(document.getElementById(id+"_enable_fieldsform_id_temp")) {
|
31193 |
+
w_name_format="normal";
|
|
|
|
|
|
|
31194 |
|
31195 |
+
w_first_val=[document.getElementById(id+"_element_firstform_id_temp").value, document.getElementById(id+"_element_lastform_id_temp").value];
|
31196 |
+
w_title=[document.getElementById(id+"_element_firstform_id_temp").title, document.getElementById(id+"_element_lastform_id_temp").title];
|
31197 |
+
|
31198 |
+
var title_middle = ['title', 'middle'];
|
31199 |
+
for(var l=0; l<2; l++)
|
31200 |
+
{
|
31201 |
+
w_first_val.push(document.getElementById(id+'_element_'+title_middle[l]+'form_id_temp') ? document.getElementById(id+'_element_'+title_middle[l]+'form_id_temp').value : '');
|
31202 |
+
w_title.push(document.getElementById(id+'_element_'+title_middle[l]+'form_id_temp') ? document.getElementById(id+'_element_'+title_middle[l]+'form_id_temp').title : '');
|
31203 |
+
}
|
31204 |
+
|
31205 |
+
}
|
31206 |
+
else
|
31207 |
+
{
|
31208 |
+
if(document.getElementById(id+'_element_middleform_id_temp'))
|
31209 |
+
w_name_format="extended";
|
31210 |
+
else
|
31211 |
+
w_name_format="normal";
|
31212 |
|
31213 |
+
if(w_name_format=="normal") {
|
31214 |
+
w_first_val=[document.getElementById(id+"_element_firstform_id_temp").value, document.getElementById(id+"_element_lastform_id_temp").value];
|
31215 |
+
w_title=[document.getElementById(id+"_element_firstform_id_temp").title, document.getElementById(id+"_element_lastform_id_temp").title];
|
31216 |
+
}
|
31217 |
+
else {
|
31218 |
+
w_first_val=[document.getElementById(id+"_element_firstform_id_temp").value, document.getElementById(id+"_element_lastform_id_temp").value, document.getElementById(id+"_element_titleform_id_temp").value, document.getElementById(id+"_element_middleform_id_temp").value];
|
31219 |
+
w_title=[document.getElementById(id+"_element_firstform_id_temp").title, document.getElementById(id+"_element_lastform_id_temp").title, document.getElementById(id+"_element_titleform_id_temp").title,document.getElementById(id+"_element_middleform_id_temp").title];
|
31220 |
+
}
|
31221 |
+
}
|
31222 |
+
|
31223 |
if(document.getElementById(id+"_mini_label_title"))
|
31224 |
+
w_mini_title = document.getElementById(id+"_mini_label_title").innerHTML;
|
31225 |
else
|
31226 |
+
w_mini_title = "Title";
|
31227 |
+
|
31228 |
if(document.getElementById(id+"_mini_label_middle"))
|
31229 |
+
w_mini_middle = document.getElementById(id+"_mini_label_middle").innerHTML;
|
31230 |
else
|
31231 |
+
w_mini_middle = "Middle";
|
|
|
|
|
31232 |
|
31233 |
+
w_mini_labels = [w_mini_title, document.getElementById(id+"_mini_label_first").innerHTML,document.getElementById(id+"_mini_label_last").innerHTML, w_mini_middle];
|
31234 |
+
w_name_title = document.getElementById(id+'_enable_fieldsform_id_temp') ? document.getElementById(id+'_enable_fieldsform_id_temp').getAttribute('title') : (w_name_format=="normal" ? 'no' : 'yes');
|
31235 |
+
w_name_middle = document.getElementById(id+'_enable_fieldsform_id_temp') ? document.getElementById(id+'_enable_fieldsform_id_temp').getAttribute('middle') : (w_name_format=="normal" ? 'no' : 'yes');
|
31236 |
+
w_name_fields = [w_name_title, w_name_middle];
|
31237 |
+
|
31238 |
+
s=document.getElementById(id+"_element_firstform_id_temp").style.width;
|
31239 |
+
w_size=s.substring(0,s.length-2);
|
31240 |
+
atrs=return_attributes(id+'_element_firstform_id_temp');
|
31241 |
+
w_attr_name=atrs[0];
|
31242 |
+
w_attr_value=atrs[1];
|
31243 |
+
|
31244 |
form_fields+=w_field_label+"*:*w_field_label*:*";
|
31245 |
form_fields+=w_field_label_size+"*:*w_field_label_size*:*";
|
31246 |
form_fields+=w_field_label_pos+"*:*w_field_label_pos*:*";
|
31257 |
{
|
31258 |
form_fields+=w_attr_name[j]+"="+w_attr_value[j]+"*:*w_attr_name*:*";
|
31259 |
}
|
31260 |
+
form_fields+=w_name_fields.join('***')+"*:*w_name_fields*:*";
|
31261 |
+
|
31262 |
form_fields+="*:*new_field*:*";
|
31263 |
break;
|
31264 |
}
|
js/formmaker_free.js
CHANGED
@@ -3,7 +3,7 @@ j = 2;
|
|
3 |
var c;
|
4 |
var need_enable = true;
|
5 |
var a = new Array();
|
6 |
-
var count_of_fields_form =
|
7 |
if (ajaxurl.indexOf("://") != -1) {
|
8 |
var url_for_ajax = ajaxurl;
|
9 |
}
|
@@ -24923,12 +24923,12 @@ function add(key) {
|
|
24923 |
page_nav_is = 0;
|
24924 |
}
|
24925 |
if (fields_count > (count_of_fields_form + page_nav_is)) {
|
24926 |
-
alert("The free version is limited up to
|
24927 |
return;
|
24928 |
}
|
24929 |
else {
|
24930 |
-
if (count_of_fields_form >
|
24931 |
-
alert("The free version is limited up to
|
24932 |
return;
|
24933 |
}
|
24934 |
}
|
3 |
var c;
|
4 |
var need_enable = true;
|
5 |
var a = new Array();
|
6 |
+
var count_of_fields_form = 9;
|
7 |
if (ajaxurl.indexOf("://") != -1) {
|
8 |
var url_for_ajax = ajaxurl;
|
9 |
}
|
24923 |
page_nav_is = 0;
|
24924 |
}
|
24925 |
if (fields_count > (count_of_fields_form + page_nav_is)) {
|
24926 |
+
alert("The free version is limited up to 9 fields to add. If you need this functionality, you need to buy the commercial version.");
|
24927 |
return;
|
24928 |
}
|
24929 |
else {
|
24930 |
+
if (count_of_fields_form > 9) {
|
24931 |
+
alert("The free version is limited up to 9 fields to add. If you need this functionality, you need to buy the commercial version.");
|
24932 |
return;
|
24933 |
}
|
24934 |
}
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://web-dorado.com/products/wordpress-form.html
|
|
4 |
Tags: form, forms, form builder, form maker, form manager, form plugin, form with recaptcha, forms plugin, multiple forms, paypal form, survey form, feedback form, feedback forms, contact form,contact form plugin, contact form builder, form creator, email form, secure form, web form, form to email, contact forms, custom forms, form widget, captcha form, wordpress contact form ,recaptcha contact form, form creation, contact form with auto reply, widget contact form, builder, feedback, contacts form plugin , custom contact form, contact us form, formular, formulario, admin, captcha, contact, database, email, javascript, jquery, page, plugin, survey, widget, custom form, forms creator, input, validation, send copy, form with captcha
|
5 |
Requires at least: 3.4
|
6 |
Tested up to: 4.2
|
7 |
-
Stable tag: 1.7.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -54,7 +54,7 @@ Survey tools are also very convenient for adding rating systems for the posts, e
|
|
54 |
* WordPress 3.0+
|
55 |
* Multiple pre-installed sample forms
|
56 |
* Responsive layout and design
|
57 |
-
* Limited up to
|
58 |
* Twelve form fields with detailed parameters for creating forms
|
59 |
* Custom HTML with standard editor
|
60 |
* Text Input form fields (included 10 different types)
|
@@ -277,6 +277,10 @@ The Form Maker (Pro version) has simple PayPal integration. This allows the user
|
|
277 |
|
278 |
== Changelog ==
|
279 |
|
|
|
|
|
|
|
|
|
280 |
= 1.7.45 =
|
281 |
New: Option to disable past days in date picker
|
282 |
|
4 |
Tags: form, forms, form builder, form maker, form manager, form plugin, form with recaptcha, forms plugin, multiple forms, paypal form, survey form, feedback form, feedback forms, contact form,contact form plugin, contact form builder, form creator, email form, secure form, web form, form to email, contact forms, custom forms, form widget, captcha form, wordpress contact form ,recaptcha contact form, form creation, contact form with auto reply, widget contact form, builder, feedback, contacts form plugin , custom contact form, contact us form, formular, formulario, admin, captcha, contact, database, email, javascript, jquery, page, plugin, survey, widget, custom form, forms creator, input, validation, send copy, form with captcha
|
5 |
Requires at least: 3.4
|
6 |
Tested up to: 4.2
|
7 |
+
Stable tag: 1.7.46
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
54 |
* WordPress 3.0+
|
55 |
* Multiple pre-installed sample forms
|
56 |
* Responsive layout and design
|
57 |
+
* Limited up to 9 fields to add
|
58 |
* Twelve form fields with detailed parameters for creating forms
|
59 |
* Custom HTML with standard editor
|
60 |
* Text Input form fields (included 10 different types)
|
277 |
|
278 |
== Changelog ==
|
279 |
|
280 |
+
= 1.7.46 =
|
281 |
+
Limited up to 9 fields to add
|
282 |
+
New: Enable/Disable Title and Middle Name for Name field
|
283 |
+
|
284 |
= 1.7.45 =
|
285 |
New: Option to disable past days in date picker
|
286 |
|