* {use} can be a description of the use or where it used (i.e. "reg-event-edit")
* {id} should be an ID of the record these fields are associated with, for example a registration event ID
*/
-add_filter( 'glm-members-customfields-edit', function( $content, $fid ){
+add_filter( 'glm-members-customfields-form-edit', function( $content, $fid ){
unset( $_REQUEST['glm_action'] );
$content .= $this->controller( 'customFields', 'index', array( 'fid' => $fid ), true );
return $content;
}, 10, 2 );
-
-
-
-
-
* FID to reference other data.
*
* These are the hooks provided in this file. Also look at the adminHooks.php file for the
- * glm-members-customfields-edit hook used to create and edit groups of custom form fields.
+ * glm-members-customfields-form-edit hook used to create and edit groups of custom form fields.
*
- * glm-members-customfields-active Is the add-on installed and active
+ * glm-members-customfields-plugin-active Is the add-on installed and active
* glm-members-customfields-have-fields Does a particular FID exist (has fields)
* glm-members-customfields-form-display Display a particular form by FID
* glm-members-customfields-form-submit Submit data for a particular FID and optionally store it
/**
* Filter will return true if the plugin is active.
*/
-add_filter( 'glm-members-customfields-active', function( $active ){
+add_filter( 'glm-members-customfields-plugin-active', function( $active ){
return true;
}, 10, 1 );
<tr><th colspan="3" class="glm-notice"><p>Custom Fields Add-On</p></th></tr>
<tr><th colspan="3">Menu/Tab Hooks</th></tr>
<tr>
- <td>glm-members-customfields-active</td>
+ <td>glm-members-customfields-plugin-active</td>
<td>FILTER</td>
<td></td>
<td>
</tr>
<tr><th colspan="3">Fields Add/Delete/Edit</th></tr>
<tr>
- <td>glm-members-customfields-edit</td>
+ <td>glm-members-customfields-form-edit</td>
<td>FILTER</td>
<td>$content, $fid</td>
<td>
<th>fid="{Form ID String}"</th>
<td>
The "fid" attribute is the Form ID string that is unique to the
- custom form created using admin "glm-members-customfields-edit" filter.
+ custom form created using admin "glm-members-customfields-form-edit" filter.
<p>
The standard for this for ID is "{add-on-slug}-customfields-{descr-slug}-{optional-id}.<br>
where:<br>
{* Fields Table *}
<table class="" style="width: 100%; background-color: #fff; border: 1px solid black; l">
<tr style="background-color: #ddd;">
- <th>Field Name</th>
- <th>Type</th>
- <th>Required</th>
- <th width="10%">
+ <th style="text-align: left;">Field Name</th>
+ <th style="text-align: left;">Type</th>
+ <th style="text-align: left;">Required</th>
+ <th style="text-align: left;" width="10%">
<div id="{$fid}_newFieldButton" class="button button-primary glm-button-small">Add a Custom Field</div>
</th>
{if $haveCustomFields}
{foreach $custom_fields as $t}
<tr class="FieldRow_{$t.id}">
- <th style="font-weight: bold;">{$t.field_name}</th>
- <td id="editFieldType_{$t.id}">
+ <th style="font-weight: bold; text-align: left;">{$t.field_name}</th>
+ <td style="text-align: left;" id="editFieldType_{$t.id}">
{$t.field_type_descr}
</td>
- <td>
+ <td style="text-align: left;">
{$t.required.name}
</td>
- <td style="width: 10%;">
+ <td style="width: 10%; text-align: left;">
<!-- <div class="{$fid}_EditFieldButton button button-secondary glm-button-small" data-fieldId="{$t.id}" data-fieldName="{$t.field_name|escape:'html'}" data-fieldPrompt="{$t.field_prompt|escape:'html'}" data-fieldType="{$t.field_type.name|escape:'html'}" data-required="{$t.required.value}">Edit</div>
-->
<div class="{$fid}_DeleteFieldButton button button-secondary glm-button-small" data-fieldId="{$t.id}">Delete</div>