Added field for priority display of a field.
'use' => 'a'
),
+ // Priority Display
+ 'priority_display' => array(
+ 'field' => 'priority_display',
+ 'type' => 'checkbox',
+ 'use' => 'a'
+ ),
+
// required field
'required' => array(
'field' => 'required',
break;
}
-
-
-trigger_error('Stored Data: '.print_r($customFieldData,1), E_USER_NOTICE);
+
+ini_set ( log_errors_max_len, 8192 );
+trigger_error('Stored Data: '.print_r($r,1), E_USER_NOTICE);
}
* version from this plugin.
*/
define('GLM_MEMBERS_CUSTOMFIELDS_PLUGIN_VERSION', '1.0.0');
-define('GLM_MEMBERS_CUSTOMFIELDS_PLUGIN_DB_VERSION', '1.0.3');
+define('GLM_MEMBERS_CUSTOMFIELDS_PLUGIN_DB_VERSION', '1.0.4');
// This is the minimum version of the GLM Members DB plugin require for this plugin.
define('GLM_MEMBERS_CUSTOMFIELDS_PLUGIN_MIN_MEMBERS_REQUIRED_VERSION', '2.8.0');
+++ /dev/null
--- Gaslight Media Members Database - Custom Fields Add-On
--- File Created: 2017-03-27
--- Database Version: 1.0.2
--- Database Creation Script
---
--- This file is called to create a new set of tables for this
--- add-on for the most recent database version for this add-on.
---
--- There should only be one such file in this directory
---
--- To permit each query below to be executed separately,
--- all queries must be separated by a line with four dashes
-
-
--- Field Setup Table
-CREATE TABLE {prefix}custom_fields (
- id INT NOT NULL AUTO_INCREMENT,
- fid TEXT NOT NULL DEFAULT '', -- Unique ID for this form (group of these fields)
- field_name TINYTEXT NOT NULL DEFAULT '', -- Field reference name
- field_prompt TINYTEXT NOT NULL DEFAULT '', -- Prompt to display on form to user
- field_type TINYTEXT NOT NULL DEFAULT '', -- Field Type
- field_order SMALLINT NOT NULL DEFAULT 0, -- Order for Field
- required BOOLEAN NOT NULL DEFAULT '0', -- If the field is required.
- PRIMARY KEY (id),
- INDEX (field_name(40))
-);
-
-----
-
--- Data Table
-CREATE TABLE {prefix}custom_field_data (
- id INT NOT NULL AUTO_INCREMENT,
- fid TEXT NOT NULL DEFAULT '', -- Form ID
- field_id INT NOT NULL DEFAULT 0, -- Pointer to ID of field in custom_fields table
- record_id INT NOT NULL DEFAULT 0, -- id for this submission of this form
- text_data TEXT NOT NULL DEFAULT '', -- Data for a text field
- checkbox_data BOOLEAN NOT NULL DEFAULT false, -- Data for a boolean field
- integer_data INTEGER NOT NULL DEFAULT 0, -- Data for an integer field
- float_data FLOAT NOT NULL DEFAULT '0.00', -- Data for a float field
- PRIMARY KEY (id),
- INDEX (fid(30)),
- INDEX (field_id),
- INDEX (record_id)
-);
-
-----
-
--- Picklist Field Options
-CREATE TABLE {prefix}custom_field_options (
- id INT NOT NULL AUTO_INCREMENT,
- field_id INT NOT NULL DEFAULT 0, -- Pointer to ID of fields in custom_fields table
- option_text TINYTEXT NOT NULL DEFAULT '', -- Option's Displayed text
- option_value TINYTEXT NOT NULL DEFAULT '', -- Option's value
- option_cost FLOAT NOT NULL DEFAULT '0.00', -- A cost added when this option is selected
- option_default BOOLEAN NOT NULL DEFAULT false, -- Flag indicating that this option is the default
- PRIMARY KEY (id),
- INDEX (field_id)
-);
--- /dev/null
+-- Gaslight Media Members Database - Custom Fields Add-On
+-- File Created: 2017-03-27
+-- Database Version: 1.0.2
+-- Database Creation Script
+--
+-- This file is called to create a new set of tables for this
+-- add-on for the most recent database version for this add-on.
+--
+-- There should only be one such file in this directory
+--
+-- To permit each query below to be executed separately,
+-- all queries must be separated by a line with four dashes
+
+
+-- Field Setup Table
+CREATE TABLE {prefix}custom_fields (
+ id INT NOT NULL AUTO_INCREMENT,
+ fid TEXT NOT NULL DEFAULT '', -- Unique ID for this form (group of these fields)
+ field_name TINYTEXT NOT NULL DEFAULT '', -- Field reference name
+ field_prompt TINYTEXT NOT NULL DEFAULT '', -- Prompt to display on form to user
+ field_type TINYTEXT NOT NULL DEFAULT '', -- Field Type
+ field_order SMALLINT NOT NULL DEFAULT 0, -- Order for Field
+ priority_display BOOLEAN NOT NULL DEFAULT false, -- Flag to display field in limited results
+ required BOOLEAN NOT NULL DEFAULT '0', -- If the field is required.
+ PRIMARY KEY (id),
+ INDEX (field_name(40))
+);
+
+----
+
+-- Data Table
+CREATE TABLE {prefix}custom_field_data (
+ id INT NOT NULL AUTO_INCREMENT,
+ fid TEXT NOT NULL DEFAULT '', -- Form ID
+ field_id INT NOT NULL DEFAULT 0, -- Pointer to ID of field in custom_fields table
+ record_id INT NOT NULL DEFAULT 0, -- id for this submission of this form
+ text_data TEXT NOT NULL DEFAULT '', -- Data for a text field
+ checkbox_data BOOLEAN NOT NULL DEFAULT false, -- Data for a boolean field
+ integer_data INTEGER NOT NULL DEFAULT 0, -- Data for an integer field
+ float_data FLOAT NOT NULL DEFAULT '0.00', -- Data for a float field
+ PRIMARY KEY (id),
+ INDEX (fid(30)),
+ INDEX (field_id),
+ INDEX (record_id)
+);
+
+----
+
+-- Picklist Field Options
+CREATE TABLE {prefix}custom_field_options (
+ id INT NOT NULL AUTO_INCREMENT,
+ field_id INT NOT NULL DEFAULT 0, -- Pointer to ID of fields in custom_fields table
+ option_text TINYTEXT NOT NULL DEFAULT '', -- Option's Displayed text
+ option_value TINYTEXT NOT NULL DEFAULT '', -- Option's value
+ option_cost FLOAT NOT NULL DEFAULT '0.00', -- A cost added when this option is selected
+ option_default BOOLEAN NOT NULL DEFAULT false, -- Flag indicating that this option is the default
+ PRIMARY KEY (id),
+ INDEX (field_id)
+);
'1.0.0' => array('version' => '1.0.0', 'tables' => 2, 'date' => '12/01/2017'),
'1.0.1' => array('version' => '1.0.1', 'tables' => 2, 'date' => '12/05/2017'),
'1.0.2' => array('version' => '1.0.2', 'tables' => 3, 'date' => '12/15/2017'),
- '1.0.3' => array('version' => '1.0.3', 'tables' => 3, 'date' => '12/18/2017')
+ '1.0.3' => array('version' => '1.0.3', 'tables' => 3, 'date' => '12/18/2017'),
+ '1.0.4' => array('version' => '1.0.4', 'tables' => 3, 'date' => '12/19/2017')
);
--- /dev/null
+-- Gaslight Media Members Database - Custom Fields Add-On
+-- File Created: 08/30/16 09:47:15
+-- Database Version: 1.0.1
+-- Database Update From Previous Version Script
+--
+-- To permit each query below to be executed separately,
+-- all queries must be separated by a line with four dashes
+
+ALTER TABLE {prefix}custom_fields ADD COLUMN priority_display BOOLEAN;
+
</select>
</td>
</tr>
+ <tr>
+ <th style="width: 20%; white-space: nowrap;">Important Field:</th>
+ <td>
+ <input id="{$fid}_NewFieldPriorityDisplay" type="checkbox" name="priority_display">
+ Display when limited output is selected.
+ </td>
+ </tr>
<tr>
<th style="width: 20%; white-space: nowrap;">Required:</th>
<td><input id="{$fid}_NewFieldRequired" type="checkbox" name="required"></td>
<select id="glmCustomFormField_{$field.id}" type="checkbox" name="glmCustomFormField_{$field.id}">
<option value=""></option>
{foreach $field.options as $option}
- <option value="{$option.option_value}" {if $option.option_value.option_defaut}selected{/if}> {$option.option_text}
+ <option value="{$option.option_value}" {if $option.option_default.value}selected{/if}>
+ {$option.option_cost}{if $option.option_cost>0}{$option.option_cost}{/if} {$option.option_text}
+ </option>
{/foreach}
</select>
</div>