diff --git a/agc_2-X/trunk/www/agc/functions.php b/agc_2-X/trunk/www/agc/functions.php index 83ddff0c..13945936 100644 --- a/agc_2-X/trunk/www/agc/functions.php +++ b/agc_2-X/trunk/www/agc/functions.php @@ -53,6 +53,7 @@ # 210211-1916 - Disable SCRIPT custom fields Math functions on older PHP versions # 210310-1322 - Added BUTTON field type # 210401-2132 - Fixed issue #1271, security_phrase field not populating in custom fields form +# 210404-0902 - Added function to refresh a single field # # $mysql_queries = 26 @@ -326,7 +327,7 @@ function user_authorization($user,$pass,$user_option,$user_update,$bcrypt,$retur ##### BEGIN custom_list_fields_values - gather values for display of custom list fields for a lead ##### -function custom_list_fields_values($lead_id,$list_id,$uniqueid,$user,$DB,$call_id,$did_id,$did_extension,$did_pattern,$did_description,$dialed_number,$dialed_label) +function custom_list_fields_values($lead_id,$list_id,$uniqueid,$user,$DB,$call_id,$did_id,$did_extension,$did_pattern,$did_description,$dialed_number,$dialed_label,$only_field,$source_field,$source_field_value) { $STARTtime = date("U"); $TODAY = date("Y-m-d"); @@ -345,6 +346,7 @@ function custom_list_fields_values($lead_id,$list_id,$uniqueid,$user,$DB,$call_i $custom_required_fields_radio='|'; $custom_required_fields_select='|'; $custom_required_fields_multi='|'; + $custom_refresh_fields='|'; require("dbconnect_mysqli.php"); @@ -370,9 +372,14 @@ function custom_list_fields_values($lead_id,$list_id,$uniqueid,$user,$DB,$call_i { $rowx=mysqli_fetch_row($rslt); $custom_records_count = $rowx[0]; - + + $only_fieldSQL=''; + if (strlen($only_field) > 0) + { + $only_fieldSQL = "and field_label='$only_field'"; + } $select_SQL=''; - $stmt="SELECT field_id,field_label,field_name,field_description,field_rank,field_help,field_type,field_options,field_size,field_max,field_default,field_cost,field_required,multi_position,name_position,field_order,field_duplicate from vicidial_lists_fields where list_id='$list_id' order by field_rank,field_order,field_label;"; + $stmt="SELECT field_id,field_label,field_name,field_description,field_rank,field_help,field_type,field_options,field_size,field_max,field_default,field_cost,field_required,multi_position,name_position,field_order,field_duplicate from vicidial_lists_fields where list_id='$list_id' $only_fieldSQL order by field_rank,field_order,field_label;"; $rslt=mysql_to_mysqli($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'05004',$user,$server_ip,$session_name,$one_mysql_log);} $fields_to_print = mysqli_num_rows($rslt); @@ -509,42 +516,54 @@ function custom_list_fields_values($lead_id,$list_id,$uniqueid,$user,$DB,$call_i ##### END grab the data from custom table for the lead_id - $CFoutput .= "\n"; - $CFoutput .= "
\n"; - if ($fields_to_print < 1) - {$CFoutput .= "";} + if (strlen($only_field) < 1) + { + $CFoutput .= "\n"; + $CFoutput .= "
"._QXZ("There are no custom fields for this list")."
\n"; + if ($fields_to_print < 1) + {$CFoutput .= "";} + } $o=0; $last_field_rank=0; while ($fields_to_print > $o) { $helpHTML=''; - if (strlen($A_field_help[$o])>0) + if ( (strlen($A_field_help[$o])>0) and (strlen($only_field) < 1) ) {$helpHTML="  "._QXZ("help")."+";} - if ($last_field_rank=="$A_field_rank[$o]") + if ( ($last_field_rank=="$A_field_rank[$o]") and (strlen($only_field) < 1) ) {$CFoutput .= "         ";} else { - $CFoutput .= "\n"; - $CFoutput .= "
"._QXZ("There are no custom fields for this list")."
$helpHTML
";} else { - if ($last_field_rank=="$A_field_rank[$o]") - {$CFoutput .= "  ";} - else - {$CFoutput .= "
";} + if (strlen($only_field) < 1) + { + if ($last_field_rank=="$A_field_rank[$o]") + {$CFoutput .= "  ";} + else + {$CFoutput .= "";} + } + } + if (strlen($only_field) < 1) + { + $field_HTML=""; } - $field_HTML=''; if ( ($A_field_type[$o]=='SELECT') or ($A_field_type[$o]=='SOURCESELECT') ) { @@ -555,6 +574,10 @@ function custom_list_fields_values($lead_id,$list_id,$uniqueid,$user,$DB,$call_i $change_trigger="onchange=\"update_default_vd_select('$A_field_label[$o]');\""; $default_field_flag++; } + if (strlen($change_trigger) < 1) + { + $change_trigger="onchange=\"catchall_field_change('$A_field_label[$o]');\""; + } $field_HTML .= ""; @@ -916,7 +986,12 @@ function custom_list_fields_values($lead_id,$list_id,$uniqueid,$user,$DB,$call_i $field_HTML .= ""; } - if ( ($A_name_position[$o]=='LEFT') and ($A_field_type[$o]!='SCRIPT') and ($A_field_type[$o]!='HIDDEN') and ($A_field_type[$o]!='HIDEBLOB') ) + if (strlen($only_field) < 1) + { + $field_HTML .= ""; + } + + if ( ($A_name_position[$o]=='LEFT') and ($A_field_type[$o]!='SCRIPT') and ($A_field_type[$o]!='HIDDEN') and ($A_field_type[$o]!='HIDEBLOB') and (strlen($only_field) < 1) ) { $CFoutput .= " $field_HTML $helpHTML"; } @@ -928,7 +1003,17 @@ function custom_list_fields_values($lead_id,$list_id,$uniqueid,$user,$DB,$call_i $last_field_rank=$A_field_rank[$o]; $o++; } - $CFoutput .= "
\n"; + + $CFoutput_prefix=''; + if (strlen($only_field) < 1) + { + $CFoutput .= "\n"; + $CFoutput_prefix .= " \n"; + } + + $CFoutput = "$CFoutput_prefix$CFoutput"; } else {$CFoutput .= _QXZ("ERROR: no custom list fields")."\n";} @@ -1423,11 +1508,14 @@ function custom_list_fields_values($lead_id,$list_id,$uniqueid,$user,$DB,$call_i if ($DB > 0) {echo "$CFoutput
\n";} } ##### END parsing for vicidial variables ##### - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; + if (strlen($only_field) < 1) + { + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } return $CFoutput; } diff --git a/agc_2-X/trunk/www/agc/vdc_db_query.php b/agc_2-X/trunk/www/agc/vdc_db_query.php index 9e4df5c0..546b2037 100644 --- a/agc_2-X/trunk/www/agc/vdc_db_query.php +++ b/agc_2-X/trunk/www/agc/vdc_db_query.php @@ -1943,7 +1943,7 @@ if ($ACTION == 'UpdateFields') $custom_field_values='q--------q'; $custom_field_types='|'; ### find the names of all custom fields, if any - $stmt = "SELECT field_label,field_type FROM vicidial_lists_fields where list_id='$entry_list_id' and field_type NOT IN('SCRIPT','DISPLAY','SWITCH') and field_label NOT IN('entry_date','vendor_lead_code','source_id','list_id','gmt_offset_now','called_since_last_reset','phone_code','phone_number','title','first_name','middle_initial','last_name','address1','address2','address3','city','state','province','postal_code','country_code','gender','date_of_birth','alt_phone','email','security_phrase','comments','called_count','last_local_call_time','rank','owner') and field_label NOT LIKE \"%_DUPLICATE_%\";"; + $stmt = "SELECT field_label,field_type FROM vicidial_lists_fields where list_id='$entry_list_id' and field_type NOT IN('SCRIPT','DISPLAY','SWITCH','BUTTON') and field_label NOT IN('entry_date','vendor_lead_code','source_id','list_id','gmt_offset_now','called_since_last_reset','phone_code','phone_number','title','first_name','middle_initial','last_name','address1','address2','address3','city','state','province','postal_code','country_code','gender','date_of_birth','alt_phone','email','security_phrase','comments','called_count','last_local_call_time','rank','owner') and field_label NOT LIKE \"%_DUPLICATE_%\";"; $rslt=mysql_to_mysqli($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00720',$user,$server_ip,$session_name,$one_mysql_log);} if ($DB) {echo "$stmt\n";} @@ -5426,7 +5426,7 @@ if ($ACTION == 'manDiaLnextCaLL') $custom_field_values='q--------q'; $custom_field_types='|'; ### find the names of all custom fields, if any - $stmt = "SELECT field_label,field_type FROM vicidial_lists_fields where list_id='$entry_list_id' and field_type NOT IN('SCRIPT','DISPLAY','SWITCH') and field_label NOT IN('entry_date','vendor_lead_code','source_id','list_id','gmt_offset_now','called_since_last_reset','phone_code','phone_number','title','first_name','middle_initial','last_name','address1','address2','address3','city','state','province','postal_code','country_code','gender','date_of_birth','alt_phone','email','security_phrase','comments','called_count','last_local_call_time','rank','owner') and field_label NOT LIKE \"%_DUPLICATE_%\";"; + $stmt = "SELECT field_label,field_type FROM vicidial_lists_fields where list_id='$entry_list_id' and field_type NOT IN('SCRIPT','DISPLAY','SWITCH','BUTTON') and field_label NOT IN('entry_date','vendor_lead_code','source_id','list_id','gmt_offset_now','called_since_last_reset','phone_code','phone_number','title','first_name','middle_initial','last_name','address1','address2','address3','city','state','province','postal_code','country_code','gender','date_of_birth','alt_phone','email','security_phrase','comments','called_count','last_local_call_time','rank','owner') and field_label NOT LIKE \"%_DUPLICATE_%\";"; $rslt=mysql_to_mysqli($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00334',$user,$server_ip,$session_name,$one_mysql_log);} if ($DB) {echo "$stmt\n";} @@ -9762,7 +9762,7 @@ if ($ACTION == 'VDADcheckINCOMING') $custom_field_values='q--------q'; $custom_field_types='|'; ### find the names of all custom fields, if any - $stmt = "SELECT field_label,field_type FROM vicidial_lists_fields where list_id='$entry_list_id' and field_type NOT IN('SCRIPT','DISPLAY','SWITCH') and field_label NOT IN('entry_date','vendor_lead_code','source_id','list_id','gmt_offset_now','called_since_last_reset','phone_code','phone_number','title','first_name','middle_initial','last_name','address1','address2','address3','city','state','province','postal_code','country_code','gender','date_of_birth','alt_phone','email','security_phrase','comments','called_count','last_local_call_time','rank','owner') and field_label NOT LIKE \"%_DUPLICATE_%\";"; + $stmt = "SELECT field_label,field_type FROM vicidial_lists_fields where list_id='$entry_list_id' and field_type NOT IN('SCRIPT','DISPLAY','SWITCH','BUTTON') and field_label NOT IN('entry_date','vendor_lead_code','source_id','list_id','gmt_offset_now','called_since_last_reset','phone_code','phone_number','title','first_name','middle_initial','last_name','address1','address2','address3','city','state','province','postal_code','country_code','gender','date_of_birth','alt_phone','email','security_phrase','comments','called_count','last_local_call_time','rank','owner') and field_label NOT LIKE \"%_DUPLICATE_%\";"; $rslt=mysql_to_mysqli($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00339',$user,$server_ip,$session_name,$one_mysql_log);} if ($DB) {echo "$stmt\n";} @@ -11098,7 +11098,7 @@ if ($ACTION == 'VDADcheckINCOMINGother') $custom_field_values='q--------q'; $custom_field_types='|'; ### find the names of all custom fields, if any - $stmt = "SELECT field_label,field_type FROM vicidial_lists_fields where list_id='$entry_list_id' and field_type NOT IN('SCRIPT','DISPLAY','SWITCH') and field_label NOT IN('entry_date','vendor_lead_code','source_id','list_id','gmt_offset_now','called_since_last_reset','phone_code','phone_number','title','first_name','middle_initial','last_name','address1','address2','address3','city','state','province','postal_code','country_code','gender','date_of_birth','alt_phone','email','security_phrase','comments','called_count','last_local_call_time','rank','owner') and field_label NOT LIKE \"%_DUPLICATE_%\";"; + $stmt = "SELECT field_label,field_type FROM vicidial_lists_fields where list_id='$entry_list_id' and field_type NOT IN('SCRIPT','DISPLAY','SWITCH','BUTTON') and field_label NOT IN('entry_date','vendor_lead_code','source_id','list_id','gmt_offset_now','called_since_last_reset','phone_code','phone_number','title','first_name','middle_initial','last_name','address1','address2','address3','city','state','province','postal_code','country_code','gender','date_of_birth','alt_phone','email','security_phrase','comments','called_count','last_local_call_time','rank','owner') and field_label NOT LIKE \"%_DUPLICATE_%\";"; $rslt=mysql_to_mysqli($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00512',$user,$server_ip,$session_name,$one_mysql_log);} if ($DB) {echo "$stmt\n";} @@ -12220,7 +12220,7 @@ if ($ACTION == 'LeaDSearcHSelecTUpdatE') $custom_field_values='q--------q'; $custom_field_types='|'; ### find the names of all custom fields, if any - $stmt = "SELECT field_label,field_type FROM vicidial_lists_fields where list_id='$entry_list_id' and field_type NOT IN('SCRIPT','DISPLAY','SWITCH') and field_label NOT IN('entry_date','vendor_lead_code','source_id','list_id','gmt_offset_now','called_since_last_reset','phone_code','phone_number','title','first_name','middle_initial','last_name','address1','address2','address3','city','state','province','postal_code','country_code','gender','date_of_birth','alt_phone','email','security_phrase','comments','called_count','last_local_call_time','rank','owner') and field_label NOT LIKE \"%_DUPLICATE_%\";"; + $stmt = "SELECT field_label,field_type FROM vicidial_lists_fields where list_id='$entry_list_id' and field_type NOT IN('SCRIPT','DISPLAY','SWITCH','BUTTON') and field_label NOT IN('entry_date','vendor_lead_code','source_id','list_id','gmt_offset_now','called_since_last_reset','phone_code','phone_number','title','first_name','middle_initial','last_name','address1','address2','address3','city','state','province','postal_code','country_code','gender','date_of_birth','alt_phone','email','security_phrase','comments','called_count','last_local_call_time','rank','owner') and field_label NOT LIKE \"%_DUPLICATE_%\";"; $rslt=mysql_to_mysqli($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00479',$user,$server_ip,$session_name,$one_mysql_log);} if ($DB) {echo "$stmt\n";} diff --git a/agc_2-X/trunk/www/agc/vdc_form_display.php b/agc_2-X/trunk/www/agc/vdc_form_display.php index ee250183..b86ec576 100644 --- a/agc_2-X/trunk/www/agc/vdc_form_display.php +++ b/agc_2-X/trunk/www/agc/vdc_form_display.php @@ -50,10 +50,11 @@ # 210310-1115 - Added BUTTON field type with SubmitRefresh function # 210315-1747 - Added campaign setting for clear_form # 210329-2025 - Fixed for consistent custom fields values filtering +# 210404-1522 - Added only_field option for refresh of already-loaded custom form SOURCESELECT element # -$version = '2.14-40'; -$build = '210329-2025'; +$version = '2.14-41'; +$build = '210404-1522'; $php_script = 'vdc_form_display.php'; require_once("dbconnect_mysqli.php"); @@ -208,6 +209,12 @@ if (isset($_GET["hide_gender"])) {$hide_gender=$_GET["hide_gender"];} elseif (isset($_POST["hide_gender"])) {$hide_gender=$_POST["hide_gender"];} if (isset($_GET["button_action"])) {$button_action=$_GET["button_action"];} elseif (isset($_POST["button_action"])) {$button_action=$_POST["button_action"];} +if (isset($_GET["only_field"])) {$only_field=$_GET["only_field"];} + elseif (isset($_POST["only_field"])) {$only_field=$_POST["only_field"];} +if (isset($_GET["source_field"])) {$source_field=$_GET["source_field"];} + elseif (isset($_POST["source_field"])) {$source_field=$_POST["source_field"];} +if (isset($_GET["source_field_value"])) {$source_field_value=$_GET["source_field_value"];} + elseif (isset($_POST["source_field_value"])) {$source_field_value=$_POST["source_field_value"];} if (isset($_GET["orig_URL"])) {$orig_URL=$_GET["orig_URL"];} elseif (isset($_POST["orig_URL"])) {$orig_URL=$_POST["orig_URL"];} if (isset($_GET["DB"])) {$DB=$_GET["DB"];} @@ -312,6 +319,9 @@ $server_ip = preg_replace("/\'|\"|\\\\|;/","",$server_ip); $session_id = preg_replace('/[^0-9]/','',$session_id); $call_id = preg_replace('/[^-_\.0-9a-zA-Z]/','',$call_id); $button_action = preg_replace('/[^-_0-9a-zA-Z]/','',$button_action); +$only_field = preg_replace('/[^-_0-9a-zA-Z]/','',$only_field); +$source_field = preg_replace('/[^-_0-9a-zA-Z]/','',$source_field); +$source_field_value = preg_replace("/\'|\"|\\\\|;/",'',$source_field_value); if ($non_latin < 1) { @@ -383,6 +393,25 @@ else # do nothing for now } +### BEGIN refresh single field ### +if ( ($stage=='REFRESH_SINGLE_FIELD') and (strlen($only_field) > 0) ) + { + require_once("functions.php"); + + $CFoutput = custom_list_fields_values($lead_id,$list_id,$uniqueid,$user,$DB,$call_id,$did_id,$did_extension,$did_pattern,$did_description,$dialed_number,$dialed_label,$only_field,$source_field,$source_field_value); + + echo "$CFoutput"; + + if ($SSagent_debug_logging > 0) + { + $stage .= " $only_field"; + vicidial_ajax_log($NOW_TIME,$startMS,$link,$ACTION,$php_script,$user,$stage,$lead_id,$session_name,$stmt); + } + + exit; + } +### END refresh single field ### + ### BEGIN parse submission of the custom fields form ### if ($stage=='SUBMIT') @@ -658,6 +687,8 @@ if ($SUBMIT_only < 1) echo " \n"; echo " \n"; @@ -759,10 +955,11 @@ if ($SUBMIT_only < 1) echo "\n"; } + $only_field=''; require_once("functions.php"); - $CFoutput = custom_list_fields_values($lead_id,$list_id,$uniqueid,$user,$DB,$call_id,$did_id,$did_extension,$did_pattern,$did_description,$dialed_number,$dialed_label); + $CFoutput = custom_list_fields_values($lead_id,$list_id,$uniqueid,$user,$DB,$call_id,$did_id,$did_extension,$did_pattern,$did_description,$dialed_number,$dialed_label,$only_field,$source_field,$source_field_value); echo "$CFoutput"; @@ -774,6 +971,7 @@ if ($SUBMIT_only < 1) echo "

\n"; } echo "


\n"; + echo "
\n"; echo "\n"; } diff --git a/agc_2-X/trunk/www/vicidial/help_documentation.txt b/agc_2-X/trunk/www/vicidial/help_documentation.txt index fb40b7d6..f994e2d3 100644 --- a/agc_2-X/trunk/www/vicidial/help_documentation.txt +++ b/agc_2-X/trunk/www/vicidial/help_documentation.txt @@ -1,4 +1,4 @@ -# version: 20210327210801 +# version: 20210404162701 users-user User ID This field is where you put the users ID number, can be up to 8 digits in length, Must be at least 2 characters in length. users-pass Password This field is where you put the users password. Must be at least 2 characters in length. Only letters and numbers are allowed in user passwords. A medium strength user password will be at least 10 characters in length, and a strong user password will be at least 20 characters in length and have letters as well as at least one number. It is recommended that you use a longer password if possible, stringing together several unrelated words with no spaces, and a number somewhere in the string. The maximum size of a password is 100 characters. users-force_change_password Force Change Password If this option is set to Y then the user will be prompted to change their password the next time they log in to the administration webpage or the agent screen. Default is N. @@ -451,8 +451,8 @@ lists_fields-field_rank Field Rank The order in which these fields is displ lists_fields-field_order Field Order If more than one field has the same rank, they will be placed on the same line and they will be placed in order by this value from lowest to highest, left to right. lists_fields-field_rerank Re-Rank Fields Below If set to YES, this option will move existing other fields of an equal or lower rank down on the form by one place. Default is NO. lists_fields-field_help Field Help Optional field, if you fill it in, the agent will be able to see this text when they click on a help link next to the field in their agent interface. -lists_fields-field_type Field Type This option defines the type of field that will be displayed. TEXT is a standard single-line entry form, AREA is a multi-line text box, SELECT is a single-selection pull-down menu, MULTI is a multiple-select box, RADIO is a list of radio buttons where only one option can be selected, CHECKBOX is a list of checkboxes where multiple options can be selected, DATE is a year month day calendar popup where the agent can select the date and TIME is a time selection box. The default is TEXT. For the SELECT, MULTI, RADIO and CHECKBOX options you must define the option values below in the Field Options box. DISPLAY will display only and not allow for modification by the agent. SCRIPT will also display only, but you are able to use script variables just like in the Scripts feature. SCRIPT fields will also only display the content in the Options, and not the field name like the DISPLAY type does. HIDDEN will not show the agent the field, but will allow the field to have data imported into it and exported from it, as well as have it available to the script tab and web form address. READONLY will display the value of the data in the field, but will not allow the agent to alter the data. HIDEBLOB is similar to HIDDEN except the data storage type on the database is a BLOB type, suitable for binary data or data that needs to be secured. The SWITCH field type allows the agent to switch the lead custom fields to another list, as well as reloading the FORM tab with the new set of list custom fields for the new list. To configure SWITCH type fields, you must define the button values below in the Field Options box. SOURCESELECT is a single-selection pull-down menu where there are multiple sets of options available depending on the value of another field for the lead, see the Field Options help for more details. BUTTON will allow you to commit changes made to the form and reload it, the Field Name will be the text next to the button, the Field Default will be the text on the button, and the Field Options will need to be SubmitRefresh with the Field Size set to 1 for it to function. -lists_fields-field_options Field Options For the SELECT, MULTI, RADIO and CHECKBOX field types, you must define the option values in this box. You must put a list of comma separated option label and option text here with each option one its own line. The first value should have no spaces in it, and neither values should have any punctuation. For example - electric_meter, Electric Meter. For the SCRIPT field types, this field is where you put your script contents. You can use single quote and amphersand characters as well so that you can create links and iframe elements. If you want to put urlencoded fields in this area, make sure you use the --U-- and --V-- flags for your variables instead of using A and B, for example --U--test_field--V--. You can also use the --M-- and --N-- flags to enclose basic Math equations to have them calculated when the script is loaded initially, for example multiplying test_field by 12 would be entered with --M--(--A--test_field--B-- * 12)--N--. For the SWITCH field type, you should define the list ID for the custom fields as well as the text that you want to appear in the button to activate the new form in a comma separated line, with one line for each button you want to appear. For the SWITCH field type, it is a requirement that one of the entries be the current list ID. For BUTTON, the only current option is to put SubmitRefresh as the Field Options, which will commit any changes you have made in the form and reload the form panel. For SOURCESELECT, if this field is set to use the -province- field to determine what values to use, then the first line in the Field Options box should be -source=>province-, without the dashes. The next options line will be the first province value to look for, for example -value=>Ontario-, and if the value for that field for the lead matches, the next lines will be the options to show with the value and display text separated by a pipe. After that, you can add more values each with options after them, like this example below shows:
source=>province
value=>Ontario
option=>|select month here
option=>September|September
option=>October|October
value=>Nova Scotia
option=>|select month here
option=>June|June
option=>July|July
option=>August|August
value=>British Columbia
option=>|select month here
option=>January|January
option=>February|February
option=>March|March
value=>
option=>|no match
+lists_fields-field_type Field Type This option defines the type of field that will be displayed. TEXT is a standard single-line entry form, AREA is a multi-line text box, SELECT is a single-selection pull-down menu, MULTI is a multiple-select box, RADIO is a list of radio buttons where only one option can be selected, CHECKBOX is a list of checkboxes where multiple options can be selected, DATE is a year month day calendar popup where the agent can select the date and TIME is a time selection box. The default is TEXT. For the SELECT, MULTI, RADIO and CHECKBOX options you must define the option values below in the Field Options box. DISPLAY will display only and not allow for modification by the agent. SCRIPT will also display only, but you are able to use script variables just like in the Scripts feature. SCRIPT fields will also only display the content in the Options, and not the field name like the DISPLAY type does. HIDDEN will not show the agent the field, but will allow the field to have data imported into it and exported from it, as well as have it available to the script tab and web form address. READONLY will display the value of the data in the field, but will not allow the agent to alter the data. HIDEBLOB is similar to HIDDEN except the data storage type on the database is a BLOB type, suitable for binary data or data that needs to be secured. The SWITCH field type allows the agent to switch the lead custom fields to another list, as well as reloading the FORM tab with the new set of list custom fields for the new list. To configure SWITCH type fields, you must define the button values below in the Field Options box. SOURCESELECT is a single-selection pull-down menu where there are multiple sets of options available depending on the value of another -source- field for the lead, see the Field Options help for more details. If the -source- field that a SOURCESELECT menu is tied to changes in value, the menu will automatically update to reflect the new value of the source. BUTTON will allow you to commit changes made to the form and reload it, the Field Name will be the text next to the button, the Field Default will be the text on the button, and the Field Options will need to be SubmitRefresh with the Field Size set to 1 for it to function. +lists_fields-field_options Field Options For the SELECT, SOURCESELECT, MULTI, RADIO and CHECKBOX field types, you must define the option values in this box. You must put a list of comma separated option label and option text here with each option one its own line. The first value should have no spaces in it, and neither values should have any punctuation. For example - electric_meter, Electric Meter. For the SCRIPT field types, this field is where you put your script contents. You can use single quote and amphersand characters as well so that you can create links and iframe elements. If you want to put urlencoded fields in this area, make sure you use the --U-- and --V-- flags for your variables instead of using A and B, for example --U--test_field--V--. You can also use the --M-- and --N-- flags to enclose basic Math equations to have them calculated when the script is loaded initially, for example multiplying test_field by 12 would be entered with --M--(--A--test_field--B-- * 12)--N--. For the SWITCH field type, you should define the list ID for the custom fields as well as the text that you want to appear in the button to activate the new form in a comma separated line, with one line for each button you want to appear. For the SWITCH field type, it is a requirement that one of the entries be the current list ID. For BUTTON, the only current option is to put SubmitRefresh as the Field Options, which will commit any changes you have made in the form and reload the form panel. For SOURCESELECT, if this field is set to use the -province- field to determine what values to use for example, then the first line in the Field Options box should be -source=>province-, without the dashes. As a note, you can only link a SOURCESELECT menu to a source field that is a TEXT, READONLY or SELECT field type. The next options line will be the first province value to look for, for example -value=>Ontario-, and if the value for that field for the lead matches, the next lines will be the options to show with the value and display text separated by a pipe. After that, you can add more values each with options after them, like the example below shows:
source=>province
value=>Ontario
option=>|select month here
option=>September|September
option=>October|October
value=>Nova Scotia
option=>|select month here
option=>June|June
option=>July|July
option=>August|August
value=>British Columbia
option=>|select month here
option=>January|January
option=>February|February
option=>March|March
value=>
option=>|no match
This field is limited to 5000 characters in length, but you can double that by altering the database if you need to.
lists_fields-multi_position Option Position For CHECKBOX and RADIO field types only, if set to HORIZONTAL the options will appear on the same line possibly wrapping to the line below if there are many options. If set to VERTICAL there will be only one option per line. Default is HORIZONTAL. lists_fields-field_size Field Size This setting will mean different things depending on what the field type is. For TEXT fields, the size is the number of characters that will show in the field. For AREA fields, the size is the width of the text box in characters. For MULTI fields, this setting defines the number of options to be shown in the multi select list. For SELECT, RADIO, CHECKBOX, DATE and TIME this setting is ignored. For BUTTON fields this must be set to 1. lists_fields-field_max Field Max This setting will mean different things depending on what the field type is. For TEXT, HIDDEN and READONLY fields, the size is the maximum number of characters that are allowed in the field. For AREA fields, this field defines the number of rows of text visible in the text box. For MULTI, SELECT, RADIO, CHECKBOX, DATE and TIME this setting is ignored.